# @bobfp/yeet-state

> Yeet is a fast, boilerplate-free, state management library for JavaScript applications.

Latest version **1.0.2** (published 2019-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @bobfp/yeet-state
pnpm add @bobfp/yeet-state
yarn add @bobfp/yeet-state
bun add @bobfp/yeet-state
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-07-25 |
| First published | 2019-07-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bobfp |

## Links

- npm: https://www.npmjs.com/package/@bobfp/yeet-state
- npm.io page: https://npm.io/package/@bobfp/yeet-state

## Recent versions

- 1.0.2 (latest) — 2019-07-25
- 1.0.1 — 2019-07-25
- 1.0.0 — 2019-07-25

## README

# Yeet

Yeet is a fast, boilerplate-free, state management library for JavaScript applications.

It is also:

 * Dependency-Free

 * Tiny (1.3KB)

 * Easy To Learn

   

## Why use Yeet?

Redux is a fantastic library, but it's ideal for every application. The amount of boilerplate makes smaller application tedious to develop. 

With the advent of the React Hooks API, larger apps are starting to move away from a "pure global state" model to a more hybrid nuanced approach. In these applications, developers might find redux to be overkill.

Yeet is designed for these use cases -- to fill in the gaps in applications that strive for a happy medium between pure component state and pure global state.  



## Using Yeet

You will probably want to use the react bindings to interact with a yeet store, but here is a quick example of the low-level API

`yarn add @bobfp/yeet-state`
`npm install @bobfp/yeet-state --save`

```js
import {createStore} from 'yeet-state';

const user = {
  name: 'Bob', 
  type: 'Meat Popsicle',
  age: 32
}

const store = createStore({user});

console.log(store.getAtom('user').age)
// 32

store.subscribe('user')(user => console.log(user.age))

store.publish('user')(user => {...user, age: user.age + 1})
// 33
```

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