Rendering and architecture · Concept

Hydration

The step where JavaScript in the browser takes over server-rendered HTML and wires up the buttons, forms and state, so the page becomes interactive.

Where pages are built · updated

How it works

Server rendering and static generation send finished HTML, but it does nothing until the framework loads, rebuilds its component tree in memory, matches it against the existing HTML and attaches event handlers. Until hydration finishes, a page can look ready but ignore taps. If the server and browser render different output (a date or a random value, for example), a hydration mismatch warning appears and parts of the page may re-render.

Because hydrating a whole page is costly, newer approaches do less of it: islands (Astro) hydrate only the interactive components, selective hydration (React) handles first what the user touches, Server Components never hydrate at all, and resumability (Qwik) skips the step entirely.

More in Rendering and architecture

Where pages are built

All 16 Rendering and architecture terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.