Skip to content

null-none/hook-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hook-react

React custom hooks

Installation

npm install hook-react

or

yarn add hook-react

Hooks

  • useMemoCompare
  • useRouter
  • useEventListener
  • useWhyDidYouUpdate
  • useKeyPress
  • useOnScreen
  • usePrevious
  • useWindowSize
  • useHover
  • useLocalStorage
  • useInterval
  • useTimeout
  • useDebounce
  • useBreakpoint
  • useHeight
  • useFetch
  • useUpdate
  • useToggle
  • useArray
  • useEffectOnce
  • useCookies

Examples

import { useLocalStorage, useWindowSize  } from 'hook-react';

const [name, setName] = useLocalStorage('name', 'Bob');
const size = useWindowSize();
...

License

MIT

Donation Button

Donate