Development

    Hydration

    The process of attaching JavaScript event handlers to server-rendered HTML, making a static page interactive.

    Share

    Key Takeaways

    • Hydration is the performance cost of SSR: the browser must re-process the entire page to make it interactive.
    • Hydration errors (server/client HTML mismatch) are the most common SSR debugging challenge.
    • Partial hydration (Astro islands) eliminates unnecessary hydration by only adding JavaScript to interactive components.

    Hydration Strategies Compared

    StrategyFrameworkTrade-off
    Full hydrationNext.js, RemixAll components hydrated, largest JS bundle
    Selective hydrationReact 18+Prioritizes interactive components, progressive
    Partial hydration (islands)AstroOnly interactive components hydrated, minimal JS
    ResumabilityQwikNo hydration needed, serialized state resumes instantly

    Astro's island architecture is the most efficient for content-heavy sites: a blog page with one interactive comment form hydrates only the comment component, shipping zero JS for the rest of the page.

    Frequently Asked Questions

    Need Help With Implementation?

    Our team specializes in implementing the solutions described in this glossary.

    Get in Touch