@react-typed-hooks/utils
v1.0.5
Published
Utils for React hook written in TypeScript
Downloads
1,698
Readme
Utils
Utility functions to use within hooks.
Installation
npm install @react-typed-hooks/utils
Usage
hasWindow
Returns true if window
is a type of object.
import { hasWindow } from @react-typed-hooks/utils;
if (hasWindow()) {
window.addEventListener("keydown", downHandler);
}