0 votes
in ReactJS by

Why are Redux state functions called reducers?

1 Answer

0 votes
by

Reducers always return the accumulation of the state (based on all previous and current actions). Therefore, they act as a reducer of state. Each time a Redux reducer is called, the state and action are passed as parameters. This state is then reduced (or accumulated) based on the action, and then the next state is returned. You could reduce a collection of actions and an initial state (of the store) on which to perform these actions to get the resulting final state.

Related questions

0 votes
asked Jun 19, 2020 in ReactJS by JackTerrance
0 votes
0 votes
asked Mar 4, 2020 in ReactJS by JackTerrance
...