React hooks, without package installation.
It's like shadcn/ui but for hooks !
The idea of adding dependencies in my projects to use 2 or 3 React hooks bothered me. Why should I add another dependency ? Just for one or two hooks ? No way !
Here comes React Hooked : React hooks, without package installation.
Simple as that.
- No package installation
- 100% Typescript
- JSDoc
- Examples
- Just copy paste hooks in your code or use curl/wget
Why bother with an extra dependency when you can just grab the hooks you need ?
You can get all hooks with the following CLI options :
- Shadcn CLI
- CURL
- WGET
You can contribute by adding new hooks or by fixing bugs.
- Fork the repo
- Create a new branch
- Add your hook in the
src/hooksfolder - JSDoc must be added with the correct types - Add an example in the
src/examplesfolder - The example file must be namedUse{HookName}Example.tsx - Add a test in the
src/testsfolder - The file must be nameduse{HookName}.test.ts - Create a pull request
- Use the same name for the hook and the file
- Use
export default functionfor the hook - Try out the example in the browser
- Avoid requiring dependencies
npm install
npm run devThen open http://localhost:4321 in your browser.
MIT