# @pinyin/react-many-redux

> Redux stores with the new Context API.

Latest version **0.0.7** (published 2018-05-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pinyin/react-many-redux
pnpm add @pinyin/react-many-redux
yarn add @pinyin/react-many-redux
bun add @pinyin/react-many-redux
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2018-05-19 |
| First published | 2018-05-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 13.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Bo Bao |
| Maintainers | pinyin |
| Keywords | react, HOC, redux, data flow, react context |

## Links

- npm: https://www.npmjs.com/package/@pinyin/react-many-redux
- Repository: https://github.com/pinyin/react-many-redux
- Homepage: https://github.com/pinyin/react-many-redux#readme
- Issues: https://github.com/pinyin/react-many-redux/issues
- npm.io page: https://npm.io/package/@pinyin/react-many-redux

## Dependencies (5)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0
- [@pinyin/maybe](https://npm.io/package/@pinyin/maybe.md) ^0.0.7
- [@pinyin/react](https://npm.io/package/@pinyin/react.md) ^0.0.11
- [@pinyin/redux](https://npm.io/package/@pinyin/redux.md) ^0.0.7
- [@pinyin/types](https://npm.io/package/@pinyin/types.md) ^0.0.14

## 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.7 (latest) — 2018-05-19
- 0.0.6 — 2018-05-19
- 0.0.5 — 2018-05-12
- 0.0.4 — 2018-05-11
- 0.0.3 — 2018-05-11
- 0.0.2 — 2018-05-11
- 0.0.1 — 2018-05-10

## README

# react-many-redux

Redux stores with the new Context API.

# Install

`npm install @pinyin/react-many-redux`

TypeScript should be supported out of the box.

# Usage

```typescript jsx
import {createStoreContext} from '@pinyin/react-many-redux'
import {createStore} from 'redux'

const {Provider, Consumer} = createStoreContext({counter: 0})
const store = createStore()  // create a redux store

<Provider store={store}>
{/*...use store in descendants */}
    <Consumer distinct={(prev, curr)=> /* Optional. Receives two states, returns a boolean which indicates whether children should be updated */}>
    {
        ({state, dispatch})=> {
            // state: store state
            // dispatch: store.dispatch, dispatch action to store
        }
    }
    </Consumer>
</Provider>
```

see [test](./src/createStoreContext.test.tsx) for a more complete example.

# Notice

This project is in early development.

# License 
MIT

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