React ReadyState Effect
Simple React Effect Hook that execute callback in case current document.readyState match expected.
Installation
Using npm
npm i react-ready-state-effect
Example
useReadyStateEffect
Execute effect is current document.readyState match expected (see isReadyStateMatch).
; const FunctionalComponent = { ; /* render your component */ return null;};
isReadyStateMatch
This helper used to compare current document.readyState with required.
; ; // always true; // true if strict equal document.readyState; // true if document.readyState equal some