usehooks icon indicating copy to clipboard operation
usehooks copied to clipboard

Added a hook for usePageVisibility

Open technikhil314 opened this issue 4 years ago • 0 comments

Added a hook for usePageVisibility

This hook can be used to stop visual computation such as pausing a video or carousel when user is no more active on your react app. and again resuming the video or carousel when user focuses back on your app.
It uses Page Visibility API which works in tab switching in same browser and also uses window.onblur/window.onfocus events when user switches away from browser window.

technikhil314 avatar Apr 26 '21 08:04 technikhil314