hook-book
v0.0.1-beta.22
Published
A collection of custom React Hooks
Downloads
7
Readme
👨🍳 HookBook
A collection of React Hook recipes.
Recipes
| Recipe | Description | |---------------------------------------|-------------------------------------------------------------------------------| | useDebounce | A hook for debouncing the updates of a value, only using the trailing update. | | useDrag | A hook to make dragging elements easier. | | useKeypress | A hook to detect when the specific keys are pressed. | | useThrottle | A hook for throttling the updates of a value.
Installation
HookBook is supported in projects that are using the latest versions of React (16.8.0+). To install, run the following command from your CLI.
$ npm install hook-book
Sample Usage
import useKeyPress from 'hook-book/use-keypress'
const Component = () => {
const keysPressed = useKeyPress()
return (...)
}