Installation
This link goes to this heading@mrcaidev/hooks
is available in the npm registry. Use it with your favourite package manager!
Prerequisites
This link goes to this headingYou 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
Install the Package
This link goes to this heading@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
Basic Usage
This link goes to this headingImport hooks directly from the package.
import { useBoolean } from "@mrcaidev/hooks";
export function Component() {
// Immediately start using hooks in your component,
// with full typing support!
}