Open ghost opened 4 years ago
I'm having the same issue. The store doesn't seem to get hydrated with SSR data.
Here as well. I'm using the fetch()
method of a layout to call an async function on the store for retrieving data. This works well on the server-side, the page is being served with the right data.
However, after a split second, the store is initialized on the client side and the data disappears.
Hey, same here.
I created a reproduction scenario, showing that it works with asyncData, but not with fetch. Using fetch, the warning "Cannot stringify a function" appears several times, and the site is broken.
Hello !
I ran into an issue while using this library. I am using version 2.3.5.
When using nuxt
fetch
hook, and dispatching an action in the store, the data stored in the state vanishes once the page is loaded. However, when using theasyncData
hook allows you to have your component data reflecting the ssr fetched state. But if in that same hook you only call the action (i.e. don't return anything), the problem is the same as with fetch.I have created a reproduction repo there : https://github.com/Ghalnas/vuex-class-component-test
Thanks in advance !