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

0.0.2 • Public • Published

logo

A hook that stores the state into url query parameters. ✨

NPM Version NPM Downloads Minizip Contributors License

Installing

Inside your React project directory, run the following:

yarn add use-state-url -S

Or with npm:

npm install use-state-url -S

Or with pnpm

pnpm add use-state-url

Or with Bun

bun add use-state-url

Example

import useStateUrl from 'use-state-url';

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

useStateUrl Options

interface Options {
    navigateMode?: 'push' | 'replace';
    parseOptions?: ParseOptions;
    stringifyOptions?: StringifyOptions;
}

Readme

Keywords

none

Package Sidebar

Install

npm i use-state-url

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

5.01 kB

Total Files

5

Last publish

Collaborators

  • hunghg255