Getting Started with Redux
The UI or view is the most reliable when it’s a result of a pure function acting on the state.
Redux takes this further by saying all state changes have to be a result of pure functions.
Each change is the state is an output of a pure function, so each time we get a new object.
There’s always a single function that calculates the new state.
It doesn’t have to be slow – you can keep reference to parts of the old state. You only change what has actually changed.
This is called the reducer.