|
1 | 1 | # Entities reducer |
2 | 2 |
|
| 3 | +Redux high order reducer for normalized `flux-standard-action`s |
| 4 | + |
3 | 5 | [![Build Status][build-badge]][build] |
4 | 6 | [![Code Coverage][coverage-badge]][coverage] |
5 | 7 | [![version][version-badge]][package] |
6 | 8 |
|
7 | 9 |
|
8 | 10 | [![Watch on GitHub][github-watch-badge]][github-watch] |
9 | 11 | [![Star on GitHub][github-star-badge]][github-star] |
10 | | -[![Tweet][twitter-badge]][twitter] |
11 | 12 |
|
12 | 13 |
|
13 | | --- TODO: Write some docs |
| 14 | +Allows for updates to entities in state. Accepts custom reducers to further control. |
| 15 | + |
| 16 | +## Usage |
| 17 | + |
| 18 | +```javascript |
| 19 | +import { combineReducers } from 'redux'; |
| 20 | +import entitiesReducer from 'entities-reducer'; |
14 | 21 |
|
15 | | -For now read the tests :) |
| 22 | +const rootReducer = combineReducers({ |
| 23 | + entities: entitiesReducer({ |
| 24 | + /* custom reducers here */ |
| 25 | + }), |
| 26 | +}); |
16 | 27 |
|
| 28 | +export default rootReducer; |
| 29 | +``` |
17 | 30 |
|
18 | 31 |
|
| 32 | +[build]: https://travis-ci.org/kwelch/entities-reducer |
19 | 33 | [build-badge]: https://img.shields.io/travis/kwelch/entities-reducer.svg?style=flat-square |
20 | 34 | [coverage-badge]: https://img.shields.io/codecov/c/github/kwelch/entities-reducer.svg?style=flat-square |
| 35 | +[coverage]: https://codecov.io/github/kwelch/entities-reducer |
21 | 36 | [github-watch-badge]: https://img.shields.io/github/watchers/kwelch/entities-reducer.svg?style=social |
| 37 | +[github-watch]: https://github.com/kwelch/entities-reducer/watchers |
22 | 38 | [github-star-badge]: https://img.shields.io/github/stars/kwelch/entities-reducer.svg?style=social |
23 | | -[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/kwelch/entities-reducer.svg?style=social |
| 39 | +[github-star]: https://github.com/kwelch/entities-reducer/stargazers |
24 | 40 | [version-badge]: https://img.shields.io/npm/v/entities-reducer.svg?style=flat-square |
| 41 | +[package]: https://www.npmjs.com/package/entities-reducer |
0 commit comments