# useIsClient > Reports false on the server and true after hydration. - Category: Effects - Package: `hookli` (install with `npm i hookli`) - Docs: https://hookli.vercel.app/docs/use-is-client ## Signature ```ts useIsClient(): boolean ``` ## Returns - `isClient`: `boolean` — false during server rendering and the first hydration pass, then true once mounted in the browser. Gate browser-only UI on it to keep both renders identical. ## Usage ```tsx import { useIsClient } from "hookli"; export function Demo() { const isClient = useIsClient(); if (!isClient) return

Rendering on the server…

; return

Now running in the browser.

; } ``` ## Source `src/hooks/use-is-client/use-is-client.ts` ```ts import { useEffect, useState } from "react"; export const useIsClient = () => { const [isClient, setIsClient] = useState(false); useEffect(() => { setIsClient(true); }, []); return isClient; }; ```