https://github.com/null-none/hook-react
React custom hooks
https://github.com/null-none/hook-react
functions hook hooks react reactjs
Last synced: about 1 year ago
JSON representation
React custom hooks
- Host: GitHub
- URL: https://github.com/null-none/hook-react
- Owner: null-none
- License: mit
- Created: 2020-11-19T18:21:46.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-22T06:37:19.000Z (over 2 years ago)
- Last Synced: 2025-03-18T13:27:49.321Z (about 1 year ago)
- Topics: functions, hook, hooks, react, reactjs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/hook-react
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hook-react
React custom hooks
## Installation
```bash
npm install hook-react
```
or
```bash
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
```javascript
import { useLocalStorage, useWindowSize } from 'hook-react';
const [name, setName] = useLocalStorage('name', 'Bob');
const size = useWindowSize();
...
```
## License
MIT
## Donation Button
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YYZQ6ZRZ3EW5C)