use-url-state1
TypeScript icon, indicating that this package has built-in type declarations

3.4.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

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i use-url-state1

    Weekly Downloads

    0

    Version

    3.4.1

    License

    MIT

    Unpacked Size

    40.5 kB

    Total Files

    8

    Last publish

    Collaborators

    • taoweng