Why Hydration Happens: The Performance Tradeoff
You'll learn: Why React uses hydration instead of just rendering everything on the client, and what we gain from this seemingly redundant work.
The Core Tradeoff
Hydration feels wasteful at first glance — React renders your components on the server to produce HTML, then renders them again on the client to attach interactivity. Why do the work twice?
The answer is performance perception. Without SSR, users stare at a blank screen while JavaScript downloads, parses, and renders everything. With SSR + hydration, users see meaningful content almost instantly, even before JavaScript arrives.
The Two Metrics That Matter
Time to First Contentful Paint (FCP): How quickly users see something.
- SSR wins decisively here — the server sends ready-to-display HTML immediately.
Time to Interactive (TTI): How quickly users can click and interact.
- This is where the tradeoff lives — hydration adds a delay between seeing content and using it.
Why Not Skip Hydration?
You might think: "Why not just show the HTML and never hydrate?" Because then you'd have plain, static HTML — no event handlers, no state updates, no React behavior. The button would be visible but dead.
Hydration is React saying: "I already know what this HTML should look like from the server render. Now let me wire up the interactive parts without destroying what's already on screen."
The Performance Win
Despite the duplicate work, hydration delivers a better user experience than client-only rendering. Users see content in ~100-300ms instead of ~2-5 seconds, even if they must wait another moment before clicking.
Key Takeaway: Hydration sacrifices some efficiency (duplicate rendering) to optimize perceived performance — users see content instantly while JavaScript loads in the background, then React "wakes up" the static HTML into an interactive application.