Size
0.34 kb
useDocumentVisibility
Track the visibility of the document.
Installation
Usage
Track the document visibility:
Prevent rerendering when the visibility changes:
API Reference
UseDocumentVisibilityOptions
The options for the useDocumentVisibility hook.
| Prop | Type | Default |
|---|---|---|
trackState? | boolean | true |
onChange? | ((isVisible: boolean) => void) | - |