# projective

> A tiny library for pure, reactive and composable state.

Latest version **0.1.0** (published 2017-10-24) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2017-10-24 |
| First published | 2017-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Dan Rosén |
| Maintainers | danrosen |
| Keywords | state, store, pure, immutable, reactive, projective, functional, stream, redux, flux, elm |

## Links

- npm: https://www.npmjs.com/package/projective
- Repository: https://github.com/danr/projective
- Homepage: https://github.com/danr/projective#readme
- Issues: https://github.com/danr/projective/issues
- npm.io page: https://npm.io/package/projective

## Alternatives

- [@reckona/mreact-store](https://npm.io/package/@reckona/mreact-store.md) — 976 weekly downloads
- [regular-state](https://npm.io/package/regular-state.md) — 410 weekly downloads
- [@pacote/flux-actions](https://npm.io/package/@pacote/flux-actions.md) — 65 weekly downloads
- [@pilotlab/lux-debug](https://npm.io/package/@pilotlab/lux-debug.md) — 39 weekly downloads
- [vue-persist-state](https://npm.io/package/vue-persist-state.md) — 19 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2017-10-24

## README

# projective

`projective`: a tiny library for pure, reactive and composable state.

## The gist

```javascript
import { Ref } from 'projective'

const increment = x => x + 1
const decrement = x => x - 1

const ref = Ref.root({left: 0, right: 0})

ref.on(x => console.log(x))

ref.proj('left').modify(increment)
ref.proj('right').modify(increment)
ref.proj('left').modify(decrement)
```

That's it!

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