Skip to content

Commit 7306e0f

Browse files
fix(reference): missing parameter in hydrateRoot
1 parent 5138e60 commit 7306e0f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,11 @@ By default, React will log all errors to the console. To implement your own erro
380380
381381
```js [[1, 6, "onCaughtError"], [2, 6, "error", 1], [3, 6, "errorInfo"], [4, 10, "componentStack", 15]]
382382
import { hydrateRoot } from "react-dom/client";
383+
import App from "./App.js";
383384
import { reportCaughtError } from "./reportError";
384385

385386
const container = document.getElementById("root");
386-
const root = hydrateRoot(container, {
387+
const root = hydrateRoot(container, <App />, {
387388
onCaughtError: (error, errorInfo) => {
388389
if (error.message !== "Known error") {
389390
reportCaughtError({

0 commit comments

Comments
 (0)