Closed selfagency closed 3 years ago
Add <client-only placeholder="loading...">
and it works, don't ask me how
Client Only Docs
It was in the docs/
A. It's not in the docs for this module.
B. A Nuxt module shouldn't need to be specified as client-only because the whole point is it's designed to work with Nuxt's SSR.
C. Wrapping every single component that uses store data in a client-only module defeats the entire purpose of SSR.
Browser storage is not accessible from the server side.
If conditional rendering is performed according to the module's readiness(like v-if with status), it will be solved.
Make the same initial data when rendering on the server side and on the client side.
So, I just used this in another project and it worked great out of the box no problem.
But now I'm using it in a new project and I'm getting errors.
Here's my config:
What happens is you load the page the first time and it works. Then it saves the data to localstorage, which I verified was correct in debug mode. But refresh the page and you get the error.
If I disable the module, everything goes back to working normally.
I'm using Nuxt 2.14.12 and nuxt-vuex-localstorage 1.2.7.
Thanks.