@ahooksjs/use-url-state
v3.5.1
Published
A hook that stores the state into url query parameters.
Downloads
48,097
Keywords
Readme
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