# react-redaxe

> React helpers for connecting React and Redaxe

Latest version **0.0.11** (published 2017-06-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-redaxe
pnpm add react-redaxe
yarn add react-redaxe
bun add react-redaxe
```

## 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.11 |
| Published | 2017-06-27 |
| First published | 2017-06-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jeff Lau |
| Maintainers | jefflau |
| Keywords | state, react |

## Links

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

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.11 (latest) — 2017-06-27
- 0.0.10 — 2017-06-22
- 0.0.9 — 2017-06-22
- 0.0.8 — 2017-06-21
- 0.0.7 — 2017-06-21
- 0.0.6 — 2017-06-21
- 0.0.5 — 2017-06-21
- 0.0.4 — 2017-06-21
- 0.0.3 — 2017-06-21
- 0.0.2 — 2017-06-21
- 0.0.1 — 2017-06-21

## README

# React-Redaxe

Redaxe is a simpler state container for your front-end applications. It is inspired by Redux's global state, but gets rid of the application separate of actions and reducers. Instead the 'Redaxe' way is to import your state directly into each component and whenever you want to update the state, you call the `update` function and give it the new state. To make React components testable, React-Redaxe gives a similar API to Redux, but using a connect function to add your handlers and state to props instead of directly into your component so they stay pure.

In addition to testability, it also implements [PureComponent](https://facebook.github.io/react/docs/react-api.html#react.purecomponent) which makes shallow comparisons of props to decide whether to re-run the render function. Using [immutable](https://facebook.github.io/immutable-js/) allows you to make quick deep comparisons as well.


## Installation

```bash
$ npm install --save react-redaxe
```

## API
* connect - Takes mapToStateToProps function that maps any data, whether they are handlers or state to your props. It then returns a component with the new connected component

## Example

```js
import { connect } from 'react-redaxe'
import { db } from 'redaxe'

const Component = ({ handleStateChange, foo }) => <div>
  <div>{foo}</div>
  <button onClick={handleStateChange}>Change to bar</button>
</div>

export default connect(db => ({
  handleStateChange,
  foo: db.get('foo')
}), Component)
```

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