Typesafe actions reducer builder
This library provides the function createReducerBuilder
: it's a 100% type-hinted builder which creates a redux reducer for a particular state
allowing the developer to define reducers per-action basis. It uses the typesafe-actions
library to interact with the actions.
Features
- Builder for redux reducers
- 100% type-hinted (no way to go "off the trails")
- returns an
Immutable<TState>
usingimmer
, always providing immutable states to redux
Usage
// myReducer.ts // Those are all typesafe-actions actions meta: , body: ''} // reducer's type: Reducer<DocumentState, PayloadAction<string, string>> .handlemetaAuthorChangeAction.reducer .handlemetaTitleChangeAction.reducer .handlemetaDescriptionChangeAction.reducer .handlemetaTagsAddAction.reducer .handlemetaTagsRemoveAction.reducer .handlebodyChangeAction.reducer .build