Custom hook that determines if the code is running on the client side (in the browser).
import { useIsClient } from "@tealess/hooks"; export default function Component() { const isClient = useIsClient(); return <div>{isClient ? "Client" : "server"}</div>; }