UNPKG

@vela-ui/react

Version:

Vela UI React components

22 lines (20 loc) 485 B
/** * A hook that returns true if the component is mounted on the client (hydrated) * and false when rendering on the server. * * @example * ```jsx * function Component() { * const isHydrated = useIsHydrated() * * if (!isHydrated) { * return <div>Loading...</div> * } * * return <div>Client rendered content</div> * } * ``` * @returns boolean indicating if the component is hydrated */ declare function useIsHydrated(): boolean; export { useIsHydrated };