0.0.1 • Published 6 years ago

@yeskunall/react-dom-status-hook v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

@yeskunall/react-dom-status-hook

React hook for subscribing to document.readyState

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

npm

npm i -S @yeskunall/react-dom-status-hook

Yarn

yarn add @yeskunall/react-dom-status-hook

Usage

import useDOMState from '@yeskunall/react-dom-status-hook';

function MyComponent() {
  let readyState = useDOMState();
  // {
  //   readyState: document.readyState,
  // }

  // ...
}