webcomponents-cg / community-protocols

Cross-component coordination protocols
179 stars 12 forks source link

[defer-hydration] Controlling hydration with the "defer-hydration" attribute #16

Open justinfagnani opened 3 years ago

justinfagnani commented 3 years ago

This proposal allows us to control hydration and hydration ordering by server-rendering a defer-hydration attribute, and removing it on the client when we want to trigger hydration. This decouples element definition ordering from hydration ordering, and allows sections of the page to remain non-hydrated until an outside signal.

We have this implemented in the Lit SSR library.

I put an initial draft of the proposal in #15