ts-redux-actions-reducer-factory
TypeScript icon, indicating that this package has built-in type declarations

0.3.3 • Public • Published

@ts-redux-actions-reducer-factory Build Status npm version

This reducer factory infers the action by an action creator (or by action type string, then you need to define the generic action type by yourself) and - that's new - it infers also the state. So each reducer takes aware of the return type of previous reducers and represents therefore a possible extended state that must be initialized at the end, unless done at beginning.

Installation

npm install ts-redux-actions-reducer-factory --save

Examples

Take a look at the examples at examples/.

  • examples/simple-35482241 An example that demonstrates the inference of the final reducer state.
  • examples/todos A complete project example with the most easiest form of this factory reducer.

Tests

Take a look at the (typing) tests at test/.

Contribution

Open an issue, or email me.

Package Sidebar

Install

npm i ts-redux-actions-reducer-factory

Weekly Downloads

1

Version

0.3.3

License

MIT

Unpacked Size

85 kB

Total Files

17

Last publish

Collaborators

  • teroneko