2.1.3 • Published 5 months ago

create-hook-crafter v2.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

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:

npm create hook-crafter
yarn create hook-crafter
pnpm create hook-crafter

Then follow the prompt.

Install the dependencies

Install the dependencies with npm, yarn, or pnpm.

npm install
yarn
pnpm install

Create your hooks

Create all your hooks inside the src/hooks directory.

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.

export * from "./useCountUp";

Questions

For questions and support please open a discussion.

Support

You can support this project in several ways:

Star us

Star this repo.

Share

License

MIT

2.1.2

5 months ago

2.1.1

5 months ago

2.1.3

5 months ago

2.1.0

5 months ago

2.0.1

6 months ago

2.0.0

6 months ago