Closed adamchipperfield closed 4 years ago
how much data are you rehydrating? 10 bytes? 1mb?
One cookie, for example, is a 1.5kb.
@adamchipperfield I hand-rolled my own Nuxt client-side plugin to subscribe to the store and supply identical functionality to this plugin. I can say for certain the delay is Nuxt's issue and not this plugin. How I get around the UX issue is to hide the elements on the page that absolutely depend on the state but allow the page and most of the content to go ahead and load. The only solution I know around this is to stop using Nuxt. Vue-Cli is a very nice (official) alternative to Nuxt's CLI. There's even an SSR plugin for it now.
Thank you for figuring this out @jaythomas. Glad to know that the delay is coming from Nuxt instead of this plugin!
Why is there a delay in the page load and the state being rehydrated? For me there is around a second or so. Is there not a way to have this happen pretty much instantly if we are only playing with cookies or local storage?
Would love some input as it’s really bugging me. I’ve thrown up a loading screen until the plugin has rehydrated the store, but not ideal and lighthouse doesn’t like loading screens.