This repository is NOT a reimplementation of React itself. It is a collection of reusable React hooks, utilities, and tools to enhance development productivity. 🎉
- 🚀 Lightweight and optimized hooks and utilities for React projects.
- 📦 Fully typed with TypeScript for better developer experience.
- 🔒 Clean and consistent utilities for DOM, state, and async operations.
- ✅ 100% (almost) test coverage with robust testing using Vitest.
Install the package via pnpm
, npm
, or yarn
:
# With pnpm
pnpm add @zl-asica/react
# With npm
npm install @zl-asica/react
# With yarn
yarn add @zl-asica/react
For more examples, check the documentation.
import { useToggle } from '@zl-asica/react';
const App = () => {
const [isToggled, toggle] = useToggle(false);
return <button onClick={toggle}>{isToggled ? 'ON' : 'OFF'}</button>;
};
ESM only. This package is built with ESM and is not compatible with CommonJS. If you are using CommonJS, sorry, this package is not for you. 😢
Contributions are welcome! Feel free to open an issue or submit a PR or open an issue. ❤️
This project is licensed under the MIT License.