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 26fc8bc commit a371e9eCopy full SHA for a371e9e
src/content/reference/react-dom/hydrate.md
@@ -178,6 +178,12 @@ import { useState, useEffect } from "react";
178
export default function App() {
179
const [isClient, setIsClient] = useState(() => typeof window !== "undefined");
180
181
+/* const [isClient, setIsClient] = useState(false);
182
+
183
+ useEffect(() => {
184
+ setIsClient(true);
185
+ }, []); */
186
187
return (
188
<h1>
189
{isClient ? 'Is Client' : 'Is Server'}
0 commit comments