# bjork_usecookie

> A react hook for managing cookies

Latest version **1.2.2** (published 2020-10-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install bjork_usecookie
pnpm add bjork_usecookie
yarn add bjork_usecookie
bun add bjork_usecookie
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2020-10-21 |
| First published | 2020-10-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Emil O. Einarsen |
| Maintainers | emileinarsen |
| Keywords | react, hook, cookie, useCookie |

## Links

- npm: https://www.npmjs.com/package/bjork_usecookie
- Repository: https://github.com/EmilEinarsen/bjork_useCookie
- Homepage: https://github.com/EmilEinarsen/bjork_useCookie#readme
- Issues: https://github.com/EmilEinarsen/bjork_useCookie/issues
- npm.io page: https://npm.io/package/bjork_usecookie

## Dependencies (1)

- [bjork_cookie](https://npm.io/package/bjork_cookie.md) ^1.2.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.2 (latest) — 2020-10-21
- 1.2.1 — 2020-10-21
- 1.2.0 — 2020-10-21
- 1.1.0 — 2020-10-19
- 1.0.0 — 2020-10-19

## README

# 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](https://github.com/EmilEinarsen/bjork_useCookie).
```bash
> 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](https://github.com/EmilEinarsen/bjork_cookie).
```js
> 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.<br>

## Licence
[MIT](https://github.com/EmilEinarsen/bjork_useCookie/blob/master/LICENSE)

---
_Source: https://npm.io/package/bjork_usecookie · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
