I want dynamic change my theme when user select theme, i put theme value to localStorage,this is my code,
layout (context) {
if (context.isClient) {
// return context.app.store.state.theme.theme.current === '0' ? '' : 'dark'
return localStorage.getItem('theme')
}
}but, when i refresh current page, the layout method not run
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1707">#c1707</a>)</em></sub></div>