use-page-visibility (npm): Dead-simple, zero-config React hook lib for detecting page visibility 👁️
Keywords: react|hooks|page visiblity|visibilityState