https://github.com/novajslabs/hook-crafter
A Vite and TypeScript template for building your React hook library
https://github.com/novajslabs/hook-crafter
hook hooks react react-custom-hook react-custom-hooks react-hooks reactjs typescript vite
Last synced: about 1 year ago
JSON representation
A Vite and TypeScript template for building your React hook library
- Host: GitHub
- URL: https://github.com/novajslabs/hook-crafter
- Owner: novajslabs
- License: mit
- Created: 2023-09-08T20:05:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-04T13:21:00.000Z (about 1 year ago)
- Last Synced: 2025-04-30T06:11:19.956Z (about 1 year ago)
- Topics: hook, hooks, react, react-custom-hook, react-custom-hooks, react-hooks, reactjs, typescript, vite
- Language: TypeScript
- Homepage: https://hookcrafter.dev
- Size: 210 KB
- Stars: 29
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
#
Hook Crafter
A Vite and TypeScript template for building your React hook library.
## Getting started
### Create the project
To create a Hook Crafter project, run:
```sh
npm create hook-crafter
```
```sh
yarn create hook-crafter
```
```sh
pnpm create hook-crafter
```
Then follow the prompt.
### Install the dependencies
Install the dependencies with npm, yarn, or pnpm.
```sh
npm install
```
```sh
yarn
```
```sh
pnpm install
```
### Create your hooks
Create all your hooks inside the `src/hooks` directory.
```ts
import { useState } from "react";
export const useCountUp = (increase: number) => {
const [count, setCount] = useState(0);
const increment = () => setCount(count + increase);
return { count, increment };
};
```
And export them in the `index.ts` file.
```ts
export * from "./useCountUp";
```
## Questions
For questions and support please [open a discussion](https://github.com/novajslabs/hook-crafter/discussions).
## Support
You can support this project in several ways:
### Star us
Star [this repo](https://github.com/novajslabs/hook-crafter).
### Share
- [LinkedIn](http://www.linkedin.com/shareArticle?mini=true&url=https://hookcrafter.dev/)
- [WhatsApp](https://api.whatsapp.com/send?text=https://hookcrafter.dev/)
- [Facebook](https://www.facebook.com/sharer/sharer.php?u=https://hookcrafter.dev/)
- [X](https://twitter.com/intent/tweet?url=https://hookcrafter.dev/)
- [Reddit](https://www.reddit.com/submit?url=https://hookcrafter.dev/)
## License
[MIT](https://github.com/novajslabs/hook-crafter/blob/main/LICENSE)