12. 9 February 2017 12
Simplify the debugging and on boarding process because
it’s easier to reason about the state.
Simpler to test and Easier to implement difficult features
like pagination because reducer can be nested.
Because of the transactional nature of the actions you
can go back and forward and recreate the state at a
specific point in time.
13. 9 February 2017 13
React/Redux developer tools.
Change reducers on the fly.
See the history of the state.
See the state being recalculated.
14. 9 February 2017 14
No dispatcher.
No store registration.
No tricky async code to debug.
Just 99 lines of code you can read.
17. 9 February 2017 17
Given the same input, will always return the same
output.
Side-effect-less (doesn’t mutate input or external state).
Relies on no external state.
23. 9 February 2017 23
They are pure functions
Given the state and the action, they return the
new state.
Should be the single source of truth.
24. 9 February 2017 24
Reducers should never store functions.
In the reducer you should always return a new
object.
If you have nested objects you would need to
nest Object.assign().
25. 9 February 2017 25
Where possible your state should be flat
dictionaries and should contain atomic data
(BCNF).
The store should not implement UI specific logic
so it will be reusable.
39. 9 February 2017 39
Presentational Components Container Components
Purpose
How things look (markup,
styles)
How things work (data
fetching, state updates)
Aware of Redux No Yes
To read data Read data from props Subscribe to Redux state
To change data Invoke callbacks from props Dispatch Redux actions
Are written By hand
Usually generated by React
Redux