What is Hydration?
Turkish: Hidrasyon (Hydration)
Hydration attaches browser-side JavaScript behavior to server-rendered HTML so a static interface becomes interactive.
What is Hydration?
Hydration makes HTML generated on the server or at build time interactive in the browser. The user first sees ready HTML; then JavaScript loads and attaches behavior to buttons, forms, menus, and other UI elements.
This step is common in pages delivered through SSR or static generation. The HTML can appear quickly, but some components may not respond to clicks until hydration finishes.
Common Problems
Hydration can be expensive. Large JavaScript bundles must be downloaded, parsed, and executed, which can create delays on mobile devices. Hydration errors can also occur when the HTML generated on the server does not match the first browser render.
In frameworks such as React, client and server boundaries must be designed carefully. Dates, random numbers, user-specific data, and browser APIs can create mismatches if used in the wrong place.
Business Use
Performance-focused sites reduce unnecessary hydration. Islands architecture lowers the cost by hydrating only interactive sections. In highly interactive admin panels, hydration may be unavoidable, but code splitting and lazy loading can keep its impact under control.
Related Terms
Islands architecture keeps most of a page as static HTML and hydrates only the interactive UI sections as separate islands.
QwikQwik is a web framework that resumes application state from HTML and loads JavaScript on demand for fast startup.
React.jsReact is an open-source JavaScript library for building user interfaces from reusable components that update efficiently when state changes.
SSR (Server-Side Rendering)SSR renders page HTML on the server for each request, sending ready content to the browser to improve first view and SEO.