# @fishx/store

> State management for FishX

Latest version **1.0.1** (published 2019-09-10) · 0 weekly downloads

## Install

```sh
npm install @fishx/store
pnpm add @fishx/store
yarn add @fishx/store
bun add @fishx/store
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-09-10 |
| First published | 2019-09-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 15.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | whalecloud-developer |

## Links

- npm: https://www.npmjs.com/package/@fishx/store
- npm.io page: https://npm.io/package/@fishx/store

## Dependencies (3)

- [fast-deep-equal](https://npm.io/package/fast-deep-equal.md) ^2.0.1
- [lodash.debounce](https://npm.io/package/lodash.debounce.md) ^4.0.8
- [@fishx/observable](https://npm.io/package/@fishx/observable.md) ^1.0.1

## Recent versions

- 1.0.1 (latest) — 2019-09-10
- 1.0.0 — 2019-09-10

## README

# @fishx/store

> State management for fishx

## Installation

```sh
yarn add @fishx/store
```

## Quick Start

```js
import React from 'react'

import { createStore, observe } from '@fishx/store'

const store = createStore({
  count: 1,
  increment() {
    store.count++
  },
  decrement() {
    store.count--
  },
  async asyncIncrement() {
    await new Promise(resolve => setTimeout(resolve, 1000))
    store.count++
  },
})

const App = observe(() => (
  <div>
    <span>{store.count}</span>
    <button onClick={store.decrement}>-</button>
    <button onClick={store.increment}>+</button>
    <button onClick={store.asyncIncrement}>async+</button>
  </div>
))

ReactDOM.render(<App />, document.getElementById('root'))
```

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