React custom hooks
npm install hook-react
or
yarn add hook-react
- useMemoCompare
- useRouter
- useEventListener
- useWhyDidYouUpdate
- useKeyPress
- useOnScreen
- usePrevious
- useWindowSize
- useHover
- useLocalStorage
- useInterval
- useTimeout
- useDebounce
- useBreakpoint
- useHeight
- useFetch
- useUpdate
- useToggle
- useArray
- useEffectOnce
- useCookies
import { useLocalStorage, useWindowSize } from 'hook-react';
const [name, setName] = useLocalStorage('name', 'Bob');
const size = useWindowSize();
...
MIT