Skip to content

Commit e651256

Browse files
committed
docs(react-dom): add expected error annotation for Math.random hydration example
1 parent 636e68f commit e651256

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,11 +552,10 @@ Uncaught Error: Hydration failed because the server rendered HTML didn't match t
552552
553553
#### Example mismatch {/*example-mismatch*/}
554554
555-
```js
555+
```js {expectedErrors: {'react-compiler': [2]}}
556556
function App() {
557557
return <div>{Math.random()}</div>;
558558
}
559-
```
560559

561560
This renders a different value on the server and the client, so hydration fails.
562561

0 commit comments

Comments
 (0)