useVisibilityChange

A hook that can detect the change of document visibility state.

useVisibilityChange((visible) => {});

Example

Basic usage of useVisibilityChange hook.

API

PropertyDescriptionType
fnThe callback function() => void
delayThe delay time to invoke the callback functionnumber
ON THIS PAGE