# react-pure-flux

> Connect pure-flux stores to React

Latest version **1.2.0** (published 2017-11-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-pure-flux
pnpm add react-pure-flux
yarn add react-pure-flux
bun add react-pure-flux
```

## 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 | 2017-11-08 |
| First published | 2016-09-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Peter W Moresi |
| Maintainers | jcfisher007 |
| Keywords | react, flux, pure-flux, react.js, react, component, react, state, redux |

## Links

- npm: https://www.npmjs.com/package/react-pure-flux
- Repository: https://github.com/WebsiteHQ/react-pure-flux
- Homepage: https://github.com/WebsiteHQ/react-pure-flux#readme
- Issues: https://github.com/WebsiteHQ/react-pure-flux/issues
- npm.io page: https://npm.io/package/react-pure-flux

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^15.3.1
- [react-addons-pure-render-mixin](https://npm.io/package/react-addons-pure-render-mixin.md) ^15.3.2

## 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

- 1.2.0 (latest) — 2017-11-08
- 1.1.1 — 2016-10-26
- 1.1.0 — 2016-10-12
- 1.0.1 — 2016-10-08
- 1.0.0 — 2016-10-08
- 0.12.0 — 2016-10-07
- 0.11.0 — 2016-10-02
- 0.10.99 — 2016-09-13
- 0.9.99 — 2016-09-12

## README

# react-pure-flux

[![CircleCI](https://circleci.com/gh/PureFlux/react-pure-flux.svg?style=svg)](https://circleci.com/gh/WebsiteHQ/react-pure-flux)

Connect a [pure-flux](https://github.com/PureFlux/pure-flux) store to [React.js](https://facebook.github.io/react/).

It enables the [PureRenderMixin](https://facebook.github.io/react/docs/pure-render-mixin.html) to improve performance.

## Install

```sh
npm install --save react-pure-flux pure-flux
```

## Example

```js
var Component = require('react').Component;
var {createStore, dispatch} = require('pure-flux');
var {connectStore} = require('react-pure-flux');

var countStore = createStore("CounterStore", (state={ count: 0 }, action) => {
  switch (action.type) {
    case 'increment':
    return { count: state.count+1 };
    default:
    return state;
  }
});

class MyComponent extends Component {

  handleUpClick() {
    dispatch('increment')
  }

  handleDownClick() {
    dispatch('decrement')
  }

  render() {
    return (
      <div>
        <p>{this.props.count}</p>
        <button onClick={this.handleUpClick}>+1</button>
        <button onClick={this.handleDownClick}>-1</button>
      </div>
    );
  }

});

EnhancedComponent = connectStore(countStore, MyComponent, (state) => {
  count: state
})
```

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