You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The useIsClient hook is useful for determining whether the code is running on
17
-
the client-side or server-side. The hook initializes a state variable called
18
-
"isClient" and sets its initial value to false. This information can be
19
-
utilized in conditional rendering, handling browser-specific behavior, or
20
-
making API calls that should only be executed on the client-side.
16
+
useIsClient is useful for determining if it's safe to run certain client-only hooks like useMediaQuery or useLocalStorage. It returns a boolean determining if React's useEffect hook has finished running (which means the app is being rendered on the client and it's safe to use browser specific APIs).
0 commit comments