@m0n0lab/react-hooks@1.1.4Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
pabloimrik17/monolabIt is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
88%
Published
a month ago (1.1.4)
@m0n0lab/react-hooks
A collection of React lifecycle hooks for functional components. Simplify your React development with clean, reusable, well-tested, and type-safe hooks.
Features
- 🚀 Production ready
- 📘 Well documented
Installation
npm
npm install @m0n0lab/react-hooks
pnpm
pnpm add @m0n0lab/react-hooks
JSR
npx jsr add @m0n0lab/react-hooks
Usage
import { useDidMount, useWillUnmount } from "@m0n0lab/react-hooks"; function MyComponent() { useDidMount(() => { console.log("Component mounted"); }); useWillUnmount(() => { console.log("Component will unmount"); }); return <div>Hello World</div>; }
API
useDidMount(callback: () => void): void
Executes the callback once when the component mounts.
useWillUnmount(callback: () => void): void
Executes the callback when the component is about to unmount.
License
MIT
Built and signed on
GitHub Actions
Add Package
deno add jsr:@m0n0lab/react-hooks
Import symbol
import * as react_hooks from "@m0n0lab/react-hooks";
Import directly with a jsr specifier
import * as react_hooks from "jsr:@m0n0lab/react-hooks";
Add Package
pnpm i jsr:@m0n0lab/react-hooks
pnpm dlx jsr add @m0n0lab/react-hooks
Import symbol
import * as react_hooks from "@m0n0lab/react-hooks";
Add Package
yarn add jsr:@m0n0lab/react-hooks
yarn dlx jsr add @m0n0lab/react-hooks
Import symbol
import * as react_hooks from "@m0n0lab/react-hooks";
Add Package
vlt install jsr:@m0n0lab/react-hooks
Import symbol
import * as react_hooks from "@m0n0lab/react-hooks";
Add Package
npx jsr add @m0n0lab/react-hooks
Import symbol
import * as react_hooks from "@m0n0lab/react-hooks";
Add Package
bunx jsr add @m0n0lab/react-hooks
Import symbol
import * as react_hooks from "@m0n0lab/react-hooks";