# reflexus

> The observers based predictable state changes for javascript apps

Latest version **0.0.1** (published 2017-06-19) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-06-19 |
| First published | 2017-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Roman Myronov |
| Maintainers | shamash |
| Keywords | observers, reactive, state, managment |

## Links

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

## Dependencies (2)

- [most](https://npm.io/package/most.md) ^1.4.1
- [most-subject](https://npm.io/package/most-subject.md) ^5.3.0

## 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.0.1 (latest) — 2017-06-19

## README

# Reflexus
=========================

Predictable state managment library, based on observers. It's basically a lightweight library on top of super awesome most.js.

## Installation

`npm install reflexus`

or

`yarn add reflexus`


## Usage

Reflexus has two building blocks: the sources and the main function.  
Sources provide incoming event stream and allow to listen with convinient `Reflexus.sensor` function. Any trigger or side effectfull action is created, using `Reflexus.trigger` function.

To start application you need to supply main implementation to the `Reflexus.run`

Example:

```

const ws = Reflexus.sensor(websokets('ws://localhost:4000'))
const tick = Reflexus.trigger((event) => console.log(event))
const main = (sources) => {
  return {
     log: sources.log.merge(sources.ws)
  }
}

const sources = {
  ws: ws,
  log: tick
}

Reflexus.run(main,  sources)

```

## Tests

`npm test` or `yarn test`

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