@shined/react-use
aims to reshape the new programming paradigm of React development. It enhances development efficiency, fosters better programming habits, and reduces the reliance on useEffect
and useState
by offering a multitude of high-quality, semantic Hooks. It encourages developers to gradually adapt to a React development (programming) paradigm that prioritizes 'Hooks first'.
Fundamentally, it's a SSR (Server-Side Rendering) friendly, comprehensive, and highly optimized React Hooks library that provides flexible and efficient Hook solutions, entirely developed in TypeScript, and comes with interactive documentation filled with rich examples đĨ.
It's primarily inspired by VueUse, while also drawing from react-use, ahooks, and many other outstanding libraries within the community. Special thanks to the open-source community, especially the authors of the aforementioned libraries, for their exceptional work and inspiration.
Visit the Get Started section to explore how it can be integrated into your project.
Install using your favorite package manager:
Below is an example of how to use the useAsyncFn Hook:
Next, you can proceed to the Usage Guide to learn how to improve existing code, or visit the Hooks List to see all available Hooks.