Home

Awesome

CI/CD Coverage StatusLicense:
MIT npm GitHub stars

<div align="center"> <p align="center"> <img src="./logo.png" alt="Beautiful React Hooks" width="750px" /> </p> </div> <br /> <div> <p align="center"> A collection of tailor-made React hooks to enhance your development process and make it faster. </p> </div> <div> <p align="center"> <a href="https://antonioru.github.io/beautiful-react-hooks/" target="_blank"> ๐ŸŒŸ Hooks Playground ๐ŸŒŸ </a> </p> </div>

Usage example

๐Ÿ‡ฌ๐Ÿ‡ง English | <a href="https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.zh-CN.md">๐Ÿ‡จ๐Ÿ‡ณ ็ฎ€ไฝ“ไธญๆ–‡</a> | <a href="https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.it-IT.md">๐Ÿ‡ฎ๐Ÿ‡น Italiano</a> | <a href="https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.es-ES.md"> ๐Ÿ‡ช๐Ÿ‡ธ Espaรฑol </a> | <a href="https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.uk-UA.md">๐Ÿ‡บ๐Ÿ‡ฆ Ukrainian</a> | <a href="https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.pt-BR.md">๐Ÿ‡ง๐Ÿ‡ท Brazilian Portuguese</a> | <a href="https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.pl-PL.md">๐Ÿ‡ต๐Ÿ‡ฑ Polski </a> | <a href="https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.jp-JP.md">๐Ÿ‡ฏ๐Ÿ‡ต ๆ—ฅๆœฌ่ชž </a> | <a href="https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.tr-TR.md">๐Ÿ‡น๐Ÿ‡ท Tรผrkรงe</a>

๐Ÿ’ก Why?

Custom React hooks allow developers to abstract the business logic of components into single, reusable functions.
I have noticed that many of the hooks I have created and shared across projects involve callbacks, references, events, and dealing with the component lifecycle.
Therefore, I have created beautiful-react-hooks, a collection of useful React hooks that may help other developers speed up their development process.
Moreover, I have strived to create a concise and practical API that emphasizes code readability, while keeping the learning curve as low as possible, making it suitable for larger teams to use and share t -- Please before using any hook, read its documentation! --

โ˜•๏ธ Features

<div> <p align="center"> <a href="https://antonioru.github.io/beautiful-react-hooks/" target="_blank"> ๐ŸŒŸ Hooks Playground ๐ŸŒŸ </a> </p> </div>

๐Ÿ•บ Install

by using npm:

$ npm install beautiful-react-hooks

by using yarn:

$ yarn add beautiful-react-hooks

Basic usage

importing a hooks is as easy as the following straightforward line:

import useSomeHook from 'beautiful-react-hooks/useSomeHook'

๐ŸŽจ Hooks

<div> <p align="center"> <a href="https://antonioru.github.io/beautiful-react-hooks/" target="_blank"> ๐ŸŒŸ Hooks Playground ๐ŸŒŸ </a> </p> </div>

Peer dependencies

Some hooks are built using third-party libraries (such as rxjs, react-router-dom, redux). As a result, you will see these libraries listed as peer dependencies.
Unless you are using these hooks directly, you need not install these dependencies.

Contributing

Contributions are very welcome and wanted.

To submit your custom hook, make sure you have thoroughly read and understood the CONTRIBUTING guidelines.

Prior to submitting your pull request: please take note of the following

  1. make sure to write tests for your code, run npm test and npm build before submitting your merge request.
  2. in case you're creating a custom hook, make sure you've added the documentation (you may use the HOOK_DOCUMENTATION_TEMPLATE to document your custom hook).

Credits

Icon made by Freepik from www.flaticon.com