liveBook · Manning

Partial hydration

As explained in Vanilla Web

Islands architecture is a rendering pattern in which mostly static server-rendered HTML contains independently hydrated interactive regions.

A mostly static page does not need JavaScript for every element. With partial hydration, the server renders the page as HTML, while only selected interactive regions—“islands”—ship JavaScript and hydrate independently in the browser. The remaining markup stays inert. Compared with universal rendering, where the whole page hydrates, this reduces the JavaScript sent to the client. section 2.1.4

A custom element can give each island a self-contained boundary and control when it becomes interactive. Qwik’s resumability is related but distinct: it resumes serialized state and event handlers when interaction requires them rather than hydrating upfront. Choose island boundaries around the interactions a page needs, not around its entire layout. section 2.1.4

How Vanilla Web covers it

How deep it goes
Defines independent hydration and compares rendering models, but does not provide hydration code or an implementation procedure.
Examples
Uses custom elements as possible island boundaries and names Astro and Eleventy as frameworks associated with the model.
What it assumes
Assumes familiarity with HTML, browser JavaScript, and custom elements; does not teach their mechanics.
What you can do after
Evaluate/understand it as an option for reducing browser JavaScript while retaining selected interactive regions.
How it connects
Connects server-rendered HTML, universal rendering, Web Components, custom elements, and resumability.

Also explained in

Compare how 2 books explain partial hydration →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vanilla Web. The section links point to the parts of the book it draws on.