Skip to content

Commit e74f0c8

Browse files
committed
docs(react-dom): clarify hydrateRoot checklist to reference hydration mismatch error and stack trace
1 parent e4385c4 commit e74f0c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/reference/react-dom/client/hydrateRoot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ This renders a different value on the server and the client, so hydration fails.
562562
563563
#### Debugging checklist {/*debugging-checklist*/}
564564
565-
1. Open the browser console and find the first hydration warning.
565+
1. Open the browser console and find the hydration mismatch message or error, and its stack trace.
566566
2. Look for changing values in render (`Math.random()`, `Date.now()`). Move them to server data or calculate them after hydration in [`useEffect`.](/reference/react/useEffect)
567567
3. Keep browser-only code out of render. Read `window`, `document`, and similar APIs in [`useEffect`](/reference/react/useEffect) or an event handler.
568568
4. Make sure the first client render uses the same data as the server render.

0 commit comments

Comments
 (0)