@ahooksjs/use-url-state
TypeScript icon, indicating that this package has built-in type declarations

3.5.1 • Public • Published

useUrlState

A hook that stores the state into url query parameters.

Installing

Inside your React project directory, run the following:

yarn add @ahooksjs/use-url-state -S

Or with npm:

npm install @ahooksjs/use-url-state -S

Or with pnpm

pnpm add @ahooksjs/use-url-state

Example

import useUrlState from '@ahooksjs/use-url-state';

const [state, setState] = useUrlState({ demoCount: '1' });

Documentation

https://ahooks.js.org/hooks/state/use-url-state

Readme

Keywords

none

Package Sidebar

Install

npm i @ahooksjs/use-url-state

Weekly Downloads

6,475

Version

3.5.1

License

MIT

Unpacked Size

59.5 kB

Total Files

8

Last publish

Collaborators

  • chenbin93
  • fan576679268
  • tli4
  • awmleer
  • monkindey