@ayonli/react-hooks@0.1.9Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
ayonli/react-hooksA group of react hooks that makes life easier.
This package works with BrowsersIt is unknown whether this package works with Node.js

JSR Score
82%
Published
7 months ago (0.1.9)
React Hooks
A group of react hooks that makes life easier.
This package currently include the following hooks, more hooks may be added in the future.
- useAsyncData Asynchronously load remote data, usually used with fetch API.
- useDebouncedCallback Returns a debounced function that can be used to reduce unnecessary calls.
- usePropState Uses a prop as the state in a component, and when the prop changes, the state will change accordingly.
- useRerender Returns a rerender function that can be used to trigger a rerender of the component manually.
- useRevertibleState
Adds additional functions to the
useStatehook, allowing us to undo and redo state changes. - useRouter Manipulates route and retrieving route parameters.
- useSubmit Submit data to a remote server and track the status of the request.
- useStorageState
Similar to
useState, but persist the state to thelocalStorage(by default) orsessionStorage. - useUrlState Similar to
useState, but persist the state to the URL query parameters.
Built and signed on
GitHub Actions
Add Package
pnpm i jsr:@ayonli/react-hooks
pnpm dlx jsr add @ayonli/react-hooks
Import symbol
import * as react_hooks from "@ayonli/react-hooks";
Add Package
yarn add jsr:@ayonli/react-hooks
yarn dlx jsr add @ayonli/react-hooks
Import symbol
import * as react_hooks from "@ayonli/react-hooks";
Add Package
vlt install jsr:@ayonli/react-hooks
Import symbol
import * as react_hooks from "@ayonli/react-hooks";
Add Package
npx jsr add @ayonli/react-hooks
Import symbol
import * as react_hooks from "@ayonli/react-hooks";