1.0.4 • Published 1 year ago

use-nav-state v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

use-nav-state

useNavState is a hook for react that extends useState for ReactJS.

Motivation

The motivation for this module was to do a simple state that interact with url and browser. With useNavState is updated, the values are sending to url params.

Instalation

npm i use-nav-state

or

yarn add use-nav-state

Usage

const [value, setValue] = useNavState("value");

Type

type  TUseNavState  = [value: string, setValue: (value:  string) =>  void];

useNavState(key:  string, initialValue?:  string) :  TUseNavState

Author

Github: @jaimeneto85

1.0.2

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago