# @ripter/store

> Basic Store. You can read values. Changing values requires an action that triggers reducers.

Latest version **1.2.0** (published 2019-04-30) · MIT license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2019-04-30 |
| First published | 2017-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 29.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Chris Richards |
| Maintainers | ripter |

## Links

- npm: https://www.npmjs.com/package/@ripter/store
- Repository: https://github.com/ripter/store
- Homepage: https://github.com/ripter/store#readme
- Issues: https://github.com/ripter/store/issues
- npm.io page: https://npm.io/package/@ripter/store

## Recent versions

- 1.2.0 (latest) — 2019-04-30
- 1.1.0 — 2018-04-09
- 1.0.0 — 2017-07-12

## README

# Store
The idea of the store, is that the data/state is only changed in predictable and testable ways. [`reducers`, `action`] This way the logic can be tested and updated as the application grows. New features can be tested by adding or removing reducers or adding new actions. You can be notified when an action happens by setting an `onChange` function.

```
// create the store
// Set the initial state, a Javascript Object
// Then the reducers that make up the logic of how the state changes.
// Finally a function to be called whenever the state changes.
const store = new Store({initial: 'state'}, [
  reduceFunctions,
], onChange);

// trigger a change
store.action({
  type: 'select',
  id: 'one',
});

// get the state
const init = store.get('initial');
```

## [API](https://ripter.github.io/store/)

## Install
```
npm install --save @ripter/store
```

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