@loke/ui
Version:
9 lines (8 loc) • 338 B
TypeScript
/**
* A hook that tracks whether the current document is hidden or visible
*
* This hook uses the Document Visibility API to monitor when a user navigates
* away from the current tab or minimizes the browser. It updates state
* whenever the document's visibility changes.
*/
export declare const useIsDocumentHidden: () => boolean;