Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jacobkosmart/custom-hooks

Create custom-hooks and can be downloaded from npm and yarn
https://github.com/jacobkosmart/custom-hooks

npm react-custom-hook react-hooks yarn

Last synced: about 2 months ago
JSON representation

Create custom-hooks and can be downloaded from npm and yarn

Awesome Lists containing this project

README

        

# jacob-hooks (Custom hooks)

Collection of React Custom Hooks ready to install with yarn and npm

## Each hook has its own package

| Hook | Description | Documentation | NPM Page | Yarn Page |
| --------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| useTitle | Update your document's title. | [Documentation](https://github.com/jacobkosmart/custom-hooks/tree/master/src/customHooks/useTitle) | [NPM Page](https://www.npmjs.com/package/@jacob-hooks/use-title) | [yarn Page](https://yarnpkg.com/package/@jacob-hooks/use-title) |
| useScroll | React Hook to get X/Y coordinates of current position of the scroll. | [Documentation](https://github.com/jacobkosmart/custom-hooks/tree/master/src/customHooks/useScroll) | [NPM Page](https://www.npmjs.com/package/@jacob-hooks/use-scroll) | [yarn Page](https://yarnpkg.com/package/@jacob-hooks/use-scroll) |
| usePreventLeave | React Hook to prompt the user for confirmation before leaving the page. Useful when changes haven't been saved. | [Documentation](https://github.com/jacobkosmart/custom-hooks/tree/master/src/customHooks/usePreventLeave) | [NPM Page](https://www.npmjs.com/package/@jacob-hooks/use-prevent-leave?activeTab=explore) | [yarn Page](https://yarnpkg.com/package/@jacob-hooks/use-prevent-leave) |
| useNetwork | React Hook to listen when the user goes online or offline. | [Documentation](https://github.com/jacobkosmart/custom-hooks/tree/master/src/customHooks/useNetwork) | [NPM Page](https://www.npmjs.com/package/@jacob-hooks/use-network) | [yarn Page](https://www.npmjs.com/package/@jacob-hooks/use-network) |
| useInput | React Hook to update input event | [Documentation](https://github.com/jacobkosmart/custom-hooks/tree/master/src/customHooks/useInput) | [NPM Page](https://www.npmjs.com/package/@jacob-hooks/use-input) | [yarn Page](https://yarnpkg.com/package/@jacob-hooks/use-input) |
| useHover | React Hook to detect a hover on an any React Element | [Documentation](https://github.com/jacobkosmart/custom-hooks/tree/master/src/customHooks/useHover) | [NPM Page](https://www.npmjs.com/package/@jacob-hooks/use-hover) | [yarn Page](https://yarnpkg.com/package/@jacob-hooks/use-hover) |
| useFadeIn | React Hook to fade in any element. | [Documentation](https://github.com/jacobkosmart/custom-hooks/tree/master/src/customHooks/useFadeIn) | [NPM Page](https://www.npmjs.com/package/@jacob-hooks/use-fade-in) | [yarn Page](https://yarnpkg.com/package/@jacob-hooks/use-fade-in) |
| useConfirm | React Hook to ask the user for a confirmation before executing a function. | [Documentation](https://github.com/jacobkosmart/custom-hooks/tree/master/src/customHooks/useConfirm) | [NPM Page](https://www.npmjs.com/package/@jacob-hooks/use-confirm) | [yarn Page](https://yarnpkg.com/package/@jacob-hooks/use-fade-in) |
| useClick | React Hook to execute a function when the mouse click then add event listener | [Documentation](https://github.com/jacobkosmart/custom-hooks/tree/master/src/customHooks/useClick) | [NPM Page](https://www.npmjs.com/package/@jacob-hooks/use-click) | [yarn Page](https://yarnpkg.com/package/@jacob-hooks/use-click) |
| useBeforeLeave | React Hook to execute a function when the mouse leaves the page. Useful to show a popup or for analytics. | [Documentation](https://github.com/jacobkosmart/custom-hooks/tree/master/src/customHooks/useBeforeLeave) | [NPM Page](https://www.npmjs.com/package/@jacob-hooks/use-before-leave) | [yarn Page](https://yarnpkg.com/package/@jacob-hooks/use-before-leave) |
| useAxios | React Hook to send HTTP request and get data from URL | [Documentation](https://github.com/jacobkosmart/custom-hooks/tree/master/src/customHooks/useAxios) | [NPM Page](https://www.npmjs.com/package/@jacob-hooks/use-axios) | [yarn Page](https://yarnpkg.com/package/@jacob-hooks/use-axios) |