# Hydration

> Browser code takes over a page the server built. Then its buttons work.

**Field:** Software Development  
**Category:** Web Development  
**Also known as:** Client Hydration, Rehydration

## Think of it like

Think of it like a paper plant that comes to life when you add water. It looked right, and now it can move.

## Definition

Hydration is when browser code takes over a page the server built. The HTML arrives ready to read, but its buttons do nothing yet. Then the framework's code loads. It hooks up the event handlers and rebuilds its state. After that, the page works like a normal app. If the browser and the server draw the page in different ways, the framework shows an error.

## Example

Lucy opens a product page. She can read it at once, and half a second later, hydration makes the Add to Cart button work.

## Why it matters

Hydration gives you a fast first view and a working app. Most modern frameworks rely on it.

## Common mistake

Showing one thing on the server and another in the browser, like the time. This is called a hydration mismatch.

## Three principles

- **Server builds first.** HTML arrives ready to read.
- **Browser takes over.** Code wires up the buttons.
- **Must match.** Both sides must render the same.

## Related terms

- [Server-Side Rendering (SSR)](https://learn.benibix.com/term/development/server-side-rendering)
- [Client-Side Rendering (CSR)](https://learn.benibix.com/term/development/client-side-rendering)
- [Browser Event](https://learn.benibix.com/term/development/browser-event)
- [React](https://learn.benibix.com/term/development/react)
- [Hydration (Nutrition)](https://learn.benibix.com/term/general/hydration)

---

Source: https://learn.benibix.com/term/development/hydration
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
