Skip to content

Latest commit

Β 

History

History
19 lines (12 loc) Β· 354 Bytes

useIsClient.md

File metadata and controls

19 lines (12 loc) Β· 354 Bytes

🍐 useIsClient

Check if the javascript is loaded from the web client

Returns

  • isClient: Bool: true when window is available. False when server side rendered

Usage

import { useIsClient } from "react-recipes";

const App = () => {
  const isClient = useIsClient();

  return <div>{isClient && "client side rendered"}</div>;
};