We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c27e5b commit 0c57d4aCopy full SHA for 0c57d4a
src/content/reference/react-dom/hydrate.md
@@ -176,10 +176,9 @@ hydrate(<App />, document.getElementById('root'));
176
import { useState, useEffect } from "react";
177
178
export default function App() {
179
- const [isClient, setIsClient] = useState(false);
+const [isClient, setIsClient] = useState(() => typeof window !== "undefined");
180
181
useEffect(() => {
182
- // eslint-disable-next-line react-compiler/react-compiler
183
setIsClient(true);
184
}, []);
185
0 commit comments