UNPKG

@geee-be/react-utils

Version:

A collection of powerful, type-safe React hooks and utility functions. Includes state management, SSR-compatible hooks, device detection, and browser API wrappers.

12 lines (8 loc) 209 B
import { useEffect, useState } from 'react'; export const useIsClient = () => { const [isClient, setIsClient] = useState(false); useEffect(() => { setIsClient(true); }, []); return isClient; };