April 2018
Intermediate to advanced
284 pages
6h 43m
English
Actions only specify what has happened but do not specify what is the effect of that action on the application state. The reducer function specifies how the application state is changed. It is a pure function that takes the two arguments—previous state and an action—and returns the next updated state.
(previousState, action) =>newState
Things you should never do inside a reducer:
In Redux, a single object represents the application state. So, before we write any code, it is very important to think and decide the structure of the application state object.
It is recommended that we keep our state object as normalized as possible and ...