In a Redux app, when updating State we would dispatch an action and then the related Reducer would compute a new version of State based on the actionType passed in.
We would come to a point where we need to update multiple part of State by a function, like within an onClickHandler. In this situation, there are at least two ways to accomplish that.
- Create a single action to dispatch in the onClickHanlder, and the
Reducerwould be responsible for implement to logic of updating those different parts of theState