1.2.0 • Published 5 years ago

@rehooks/document-visibility v1.2.0

Weekly downloads
198
License
MIT
Repository
github
Last release
5 years ago

@rehooks/document-visibility

React hook for subscribing to document visibility

Note: This is using the new React Hooks API Proposal which is subject to change until React 16.7 final.

You'll need to install react, react-dom, etc at ^16.7.0-alpha.0

Install

yarn add @rehooks/document-visibility

Usage

import useDocumentVisibility from '@rehooks/document-visibility';

function MyComponent() {
  let documentVisibility = useDocumentVisibility();
  // documentVisibility = "hidden" | "visible" | "prerender"

  // ...
}
1.2.0

5 years ago

1.1.1

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago