bjork_usecookie

1.2.2 • Public • Published

What is this?

A React hook used for managing state and cookies simultaneously, effortlessly.

Install

Use npm to install bjork_useCookie or copy the code manually form github.

> npm i bjork_useCookie

Usage

Utilizes and, therefor, functions like Reacts useState. The difference being that setState takes a second, optional, param options that configures how the cookie is packaged. For more information checkout the function set at the dependancy bjork_cookie.

> import useCookie from 'bjork_usecookie'
>
> const [ state, setState ] = useCookie(_default_)
> setState(value, options?)

Contribution

Pull requests are welcome. For any considerable changes, please open an issue first to discuss what you would like to change.

Licence

MIT

/bjork_usecookie/

    Package Sidebar

    Install

    npm i bjork_usecookie

    Weekly Downloads

    1

    Version

    1.2.2

    License

    MIT

    Unpacked Size

    2.02 kB

    Total Files

    3

    Last publish

    Collaborators

    • emileinarsen