Hydration
Attaching client-side behavior 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 initializes 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 practiced: 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
Client-Server Boundary
The line in an application where execution moves from the server to the browser.
Web Platform11 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 Platform11 connections
Progressive Enhancement
Building so the core experience works without scripts, with richer behavior layered on top.
Web Platform16 connections
Related2
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from11
- 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-centered 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 behavior 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.
- Virtual DOMWeb Platform
An in-memory representation of the UI that a framework diffs against the previous version to compute minimal real DOM updates.