UNPKG

react-recipes

Version:

A React Hooks utility library containing popular customized hooks

19 lines (12 loc) 354 B
# 🍐 `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 ```js import { useIsClient } from "react-recipes"; const App = () => { const isClient = useIsClient(); return <div>{isClient && "client side rendered"}</div>; }; ```