Collection of React Custom Hooks ready to install with yarn and npm
Hook | Description | Documentation | NPM Page | Yarn Page |
---|---|---|---|---|
useTitle | Update your document's title. | Documentation | NPM Page | yarn Page |
useScroll | React Hook to get X/Y coordinates of current position of the scroll. | Documentation | NPM Page | yarn Page |
usePreventLeave | React Hook to prompt the user for confirmation before leaving the page. Useful when changes haven't been saved. | Documentation | NPM Page | yarn Page |
useNetwork | React Hook to listen when the user goes online or offline. | Documentation | NPM Page | yarn Page |
useInput | React Hook to update input event | Documentation | NPM Page | yarn Page |
useHover | React Hook to detect a hover on an any React Element | Documentation | NPM Page | yarn Page |
useFadeIn | React Hook to fade in any element. | Documentation | NPM Page | yarn Page |
useConfirm | React Hook to ask the user for a confirmation before executing a function. | Documentation | NPM Page | yarn Page |
useClick | React Hook to execute a function when the mouse click then add event listener | Documentation | NPM Page | yarn Page |
useBeforeLeave | React Hook to execute a function when the mouse leaves the page. Useful to show a popup or for analytics. | Documentation | NPM Page | yarn Page |
useAxios | React Hook to send HTTP request and get data from URL | Documentation | NPM Page | yarn Page |