Hydration
Attaching client-side behaviour to server-rendered markup without rebuilding it.
Hydration is the process by which a client framework takes over already-rendered HTML: it walks the existing Document Object Model, attaches event handlers, and initialises its internal state so subsequent updates work — without discarding and re-creating the markup.
Its defining constraint is that the client's first render must match what the server produced. Where they differ you get a hydration mismatch, which frameworks report as an error and resolve by discarding the server's work. The usual causes are all forms of the same thing: the two environments disagreed about something. Current time. A random value. A user preference read from the browser. Anything derived from window.
Hydration is also the main cost of Server-Side Rendering as usually practised: the framework and every interactive component must be downloaded and executed before the page responds to input, so a page that looked ready is not. That gap is what Islands Architecture, React Server Components, and partial hydration all exist to shrink.
A subtler hazard: content rendered by the server and then mutated directly by the browser — by a text editor, an embedded map, a third-party widget — is invisible to the framework's model. A subsequent re-render diffs against a stale picture and duplicates or destroys elements. Keying the wrapper on a value that changes with the data, forcing a clean remount, is the usual escape.
See also4
Hand-picked in the note itself — the neighbours worth reading next.
Client-Server Boundary
The line in an application where execution moves from the server to the browser.
Web Platform10 connections
contenteditable
The HTML attribute that makes an element directly editable, and the surface behind most rich-text editors.
Web Platform11 connections
Critical Rendering Path
The sequence of steps between receiving HTML and painting pixels, and everything that blocks it.
Web Platform9 connections
Progressive Enhancement
Building so the core experience works without scripts, with richer behaviour layered on top.
Web Platform14 connections
Related2
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from10
Notes elsewhere in the wiki that reach for this one.
- Client-Server BoundaryWeb Platform
The line in an application where execution moves from the server to the browser.
- contenteditableWeb Platform
The HTML attribute that makes an element directly editable, and the surface behind most rich-text editors.
- Core Web VitalsWeb Platform
Google's small set of user-centred performance metrics: loading, interactivity, and visual stability.
- Critical Rendering PathWeb Platform
The sequence of steps between receiving HTML and painting pixels, and everything that blocks it.
- Document Object ModelWeb Platform
The live tree of objects a browser builds from a document, and the surface every UI framework writes to.
- Incremental Static RegenerationWeb Platform
Serving a cached static page while regenerating it in the background after a chosen interval.
- Islands ArchitectureWeb Platform
Rendering a page as static HTML with small independently interactive regions.
- Progressive EnhancementWeb Platform
Building so the core experience works without scripts, with richer behaviour layered on top.
- React Server ComponentsWeb Platform
Components that execute only on the server and never ship their code to the browser.
- Server-Side RenderingWeb Platform
Producing a page's HTML on the server so the first response is already content.