Skip to content

hunghg255/use-state-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;
}

About

useState URL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published