With SSR or SSG, the browser gets readable HTML right away. The framework then downloads its JavaScript, rebuilds the component tree in memory and connects it to the existing DOM. Until that finishes, buttons and menus may look ready but not respond.
Why it matters
Hydration does not change what crawlers see, because the content is already in the HTML. It affects users and Core Web Vitals:
- Heavy hydration blocks the main thread, which hurts Interaction to Next Paint (INP).
- If the client renders something different from the server, React and other frameworks throw hydration errors and may re-render the whole tree, causing layout shifts.
Ways to hydrate less
- Islands architecture (Astro’s default): only interactive components ship JavaScript. A static article ships none.
- React Server Components in Next.js: server components send no client JavaScript. Only files marked
"use client"hydrate. - Lazy hydration: hydrate a component when it becomes visible or idle. In Astro that is
client:visibleorclient:idle.
Example
<!-- Astro: the article is static, only the search box hydrates -->
<Article />
<SearchBox client:idle />
Common mistakes
- Wrapping the whole Next.js layout in a client component, which turns every page into hydrated code.
- Rendering dates, random values or
window-dependent content during SSR, which causes mismatches. - Measuring only lab performance on a fast laptop. Hydration cost shows up on mid-range phones.
How Renderly handles it
We profile hydration on real devices and cut client JavaScript where content does not need it. See technical SEO for JavaScript and headless sites and our Next.js SEO audit.