increment
and multiply
actions. It is about half the size of the equivalent vanilla Redux code.createAction
generates various types of action creator functions with minimal cerenomy. The specified action type value is made available as an action creator property (increment.type
and mutliply.type
in this example), making separate action type constants unnecessary. See the Actions guide.onAction
, withInitialState
and chainReducers
helpers can be combined as a less noisy alternative to the classic switch
reducer pattern. In TypeScript, the type of the sub-reducers' action
parameters are automatically inferred from the action creators passed to onAction
, improving type safety and editor auto-completion. See the Reducers guide.