useLocalStorage on Nuxt3 #1431
Unanswered
tasiotas
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Can someone help me with persisting state with Nuxt3?
I found a great tutorial about this, followed as close as I could. The only difference I can think of, is that example is in Vue3, I use Nuxt3.
Below code writes to localStorage at page load. But once I update
msg
value, it gets to default after page reload. Cannot figure out why. Should't it check for localStorage first and use its value if it exists?Thank you!
/stores/auth.js
Beta Was this translation helpful? Give feedback.
All reactions