The Full Hydration Problem
Measure the cost of hydrating an entire React SPA and understand why static pages don't need it.
The Full Hydration Problem is a free React Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the React Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
What Is Hydration
Hydration is the process where React takes server-rendered HTML and attaches JavaScript event listeners to it. The server sends the initial HTML (fast), then the browser downloads the JavaScript bundle and React "hydrates" the static HTML to make it interactive. Until hydration completes, the page looks interactive but is not.
Traditional SPA Hydration Cost
A traditional single-page application sends the entire JavaScript bundle to the browser. React must download it, parse it, execute it, and then attach event listeners to every component in the tree. For large applications, this process can take several seconds on mid-range mobile devices.
Time To Interactive (TTI)
Time To Interactive measures how long before the user can interact with the page. Hydration directly blocks TTI: the page may look ready (server-rendered HTML is visible), but buttons and forms do not respond until React finishes attaching event listeners. A high TTI score is a poor user experience.
The Static Content Paradox
Consider a marketing page: 80% of the content is static text, images, and headers that never change. Only 20% involves interactive widgets like a newsletter form or a video player. Traditional SPA hydration still runs for 100% of the page, processing static components unnecessarily.
Measuring Hydration Cost
Chrome DevTools performance profiling reveals the hydration cost. In the Main thread waterfall, you can identify the "React hydration" task as a long JavaScript execution block after the initial paint. The longer this block, the more the main thread is occupied and the less responsive the page is.
Component Tree Size Matters
The larger the React component tree, the more work hydration requires. React must visit every component, compare the server-rendered HTML with what the component would render, and attach event listeners. A complex page with hundreds of components can have measurable hydration overhead even with fast devices.
React 18 Concurrent Hydration
React 18 introduced concurrent hydration, which allows React to break hydration into smaller chunks and yield to the browser between them. This prevents the browser from appearing completely frozen during hydration of large trees. However, concurrent hydration reduces the impact — it does not eliminate the fundamental cost.
Selective Hydration in React 18
Selective hydration (via Suspense) allows React to hydrate components in priority order — user interactions trigger immediate hydration of the relevant component. This improves responsiveness but still operates within a single React tree: all components in the tree are eventually hydrated.
The Root Insight
The fundamental insight driving Islands Architecture is that most of a typical page simply does not need JavaScript at all. Navigation bars, hero sections, footer links, blog post text, and product descriptions are purely presentational. Forcing hydration on them is wasteful by definition.
Real-World Impact
Studies from web performance teams show that JavaScript parse and execution time is the dominant cost on mobile devices. A 300kb JavaScript bundle takes 2-3 seconds to parse on a median Android phone. Reducing the JavaScript sent to the browser has outsized performance benefits compared to any React-internal optimization.
The Hydration Tax
Every kilobyte of JavaScript added to a React application adds hydration work. Even if a component is purely decorative, if it is in the React tree it participates in hydration. This "hydration tax" scales with application size and makes it progressively harder to maintain good TTI scores as applications grow.
TTI and Hydration
What is the relationship between React hydration and Time To Interactive (TTI)?
Lesson Recap
Traditional React hydration processes the entire component tree, even static content that needs no JavaScript. This blocks Time To Interactive and scales poorly with application size. React 18's concurrent and selective hydration improvements reduce the impact but do not eliminate the fundamental cost. The root insight: most page content simply does not need JavaScript, making full hydration wasteful.
Frequently asked questions
Is the “The Full Hydration Problem” lesson free?
Yes — the full text of “The Full Hydration Problem” is free to read here on the web, and the React Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the React Academy course, upgrade to CoddyKit PRO.
What will I learn in “The Full Hydration Problem”?
Measure the cost of hydrating an entire React SPA and understand why static pages don't need it. You practise React Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start React Academy?
No prior experience is required. React Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “The Full Hydration Problem” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this React Academy lesson?
Yes. Every React Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.