maoberlehner / vue-lazy-hydration

Lazy Hydration of Server-Side Rendered Vue.js Components
MIT License
1.18k stars 52 forks source link

ssr-only mode and optimizing Vuex INITIAL_STATE [Question] #37

Closed jgimness closed 4 years ago

jgimness commented 4 years ago

For ssr-only, like the "Article" in your example, is there any recommended way to avoid serializing the state from Vuex in INITIAL_STATE, since it will never be needed/hydrated client-side?

The Vue SSR guide requires Component's serverPrefetch (similar to Nuxt's asyncData) to store data in Vuex ( https://ssr.vuejs.org/guide/data.html ).

Great library BTW, I am pushing this to a high-traffic production website soon.

maoberlehner commented 4 years ago

Not that I'm aware of, unfortunately.

But Evan You hinted at SSR improvements for Vue 3 which will make this easier (and hopefully this package obsolete).

Thanks!