Skip to content

πŸ‘¨β€πŸ³ A collection of React Hook recipes

Notifications You must be signed in to change notification settings

tony-dinh/hook-book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘¨β€πŸ³ HookBook

npm version npm downloads npm downloads

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 (...)
}

About

πŸ‘¨β€πŸ³ A collection of React Hook recipes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published