0.0.1 • Published 7 years ago
@yeskunall/react-dom-status-hook v0.0.1
@yeskunall/react-dom-status-hook
React hook for subscribing to
document.readyStateNote: 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-hookYarn
yarn add @yeskunall/react-dom-status-hookUsage
import useDOMState from '@yeskunall/react-dom-status-hook';
function MyComponent() {
let readyState = useDOMState();
// {
// readyState: document.readyState,
// }
// ...
}0.0.1
7 years ago