react-storage-complete
Version:
🗄️ React hooks for accessing localStorage and sessionStorage, with syncing and prefix support. The complete package.
8 lines (7 loc) • 333 B
TypeScript
/**
* Returns false if SSR, or if the client (browser) has not finished rendering,
* and returns true when running as a client after useEffect completes.
* You can use this hook to avoid hydration issues.
* See: https://blog.logrocket.com/fixing-gatsbys-rehydration-issue/
*/
export declare const useClientReady: () => boolean;