1.0.4 • Published 2 years ago

use-nav-state v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago