Loading…
A short voice session: one question, one follow-up, then instant feedback — up to 5 minutes.
The client's first render differs from the server HTML, often due to time, randomness, locale formatting, browser-only APIs or invalid HTML nesting; make the first render deterministic and move client-only values into effects.
Hydration expects the client's first render to produce exactly the markup the server sent. Common causes are Date.now() or new Date() rendered as text, Math.random() ids instead of useId, locale or time-zone dependent formatting that differs between server and browser, reading window or localStorage during render, and invalid nesting like a div inside a p that the browser repairs. Fix the cause: pass the same data to both sides, format with a fixed locale and time zone, use useId, and render client-only content after mount with an effect or a client-only boundary. suppressHydrationWarning should be limited to unavoidable single text differences such as a timestamp.