/usecookie

A react hook for managing cookies

Primary LanguageJavaScript

What is this?

A React hook used for managing state and cookies simultaneously. A statefull wrapper around cookie-helper.

Install

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

> npm i bjork_useCookie

Usage

import useCookie from 'bjork_usecookie'

const [ state, setState ] = useCookie(_defaultValue_)
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