maoberlehner / vue-lazy-hydration

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

Disable hydration after full page load #113

Open kedrzu opened 2 years ago

kedrzu commented 2 years ago

Some time ago I filled an issue https://github.com/maoberlehner/vue-lazy-hydration/issues/88

I found that an easy way to fix this is to disable the hydration once the page is fully loaded and all hydration is finished. Once you complete the hydration any further navigation will happen in SPA mode, so no more hydration will ever occur. Also, it may have some additional performance benefit, because we don't have to mount IntersectionObservers or idle callbacks when they are not needed anymore.