Streaming SSR and Hydration
What you'll learn: How streaming HTML to the browser impacts when and how hydration happens, enabling parts of your page to become interactive before the entire page is done loading.
The Core Idea
With traditional SSR, the server generates all your HTML before sending it. The browser waits, receives everything at once, then hydrates the entire page. Streaming SSR changes this: the server sends HTML in chunks as it's generated. The browser can start rendering content immediately—and more importantly, can start hydrating components as their HTML arrives, rather than waiting for the complete document.
Think of it like a restaurant: Traditional SSR is like waiting for the entire multi-course meal to be plated before the waiter brings anything out. Streaming SSR is serving each course as it's ready—you can start eating (interacting) with the appetizer while the kitchen is still preparing dessert.
How Streaming Affects Hydration Timing
When HTML streams in, frameworks can begin hydrating the parts that have arrived. A header component might hydrate and become interactive within 100ms, while a data-heavy table lower on the page is still streaming in from the server. This progressive enhancement means users don't face a "freeze" waiting for full hydration.
The browser processes chunks sequentially, so components higher in the tree typically hydrate first. This naturally prioritizes above-the-fold content for interactivity.
Progressive Enhancement in Action
Streaming allows you to send critical UI first (navigation, headers) and defer less important content. Users can click buttons and interact with what's visible while heavier components are still being transmitted and hydrated. This dramatically improves Time to Interactive (TTI) for visible content.
Key Takeaway: Streaming SSR splits both HTML delivery and hydration into chunks, letting early-arriving components become interactive immediately rather than blocking on the full page, creating a progressively enhanced user experience.