Subscribe on changes!

Support for partial hydration

avatar
Feb 15th 2022

What problem does this feature solve?

"Partial hydration" means to hydrate specific components of a server-side-rendered page instead of the whole page. This increases the performance of pages, like ours, that have lots of static content as Vue does not have to hydrate all the content that does not change anyway during or after hydration.

Yet there is still no support for partial hydration but to build it completely manual while having major pain to do so due stuff that triggers hydration mismatches (e.g. marker comments like <!--[-->). Hydration in Vue 2 seems to be much more flexible, or robust. It just worked.

What does the proposed API look like?

I think about two approaches: One is to mount a "shallow" app that spans above all components that will be hydrated. Every hydratable component must be marked. All other DOM nodes beside those in the hydrated components are left as they are and not touched in any way.

The other approach is to be able to mount apps on components directly just like it worked in Vue 2.

avatar
Feb 16th 2022

This is what petite vue seems to solve. If not, please open an RFC in the rfcs repo