Logo
View source code on GitHub

@mrcaidev/hooks is available in the npm registry. Use it with your favourite package manager!

You should have React and React DOM installed beforehand.

npm i react react-dom     # npm
yarn add react react-dom  # yarn
pnpm add react react-dom  # pnpm

For TypeScript projects, you may also want to install @types/react and @types/react-dom.

npm i @types/react @types/react-dom     # npm
yarn add @types/react @types/react-dom  # yarn
pnpm add @types/react @types/react-dom  # pnpm

@mrcaidev/hooks is available in npm registry. Install it with your favourite package manager!

npm i @mrcaidev/hooks     # npm
yarn add @mrcaidev/hooks  # yarn
pnpm add @mrcaidev/hooks  # pnpm

Import hooks directly from the package.

import { useBoolean } from "@mrcaidev/hooks";

export function Component() {
  // Immediately start using hooks in your component,
  // with full typing support!
}