7. #BARCAMP BANGKHEN 2015
MV* PROBLEMS
▸ two-way data direction
Hacker Way: Rethinking Web App Development at Facebook https://www.youtube.com/watch?v=nYkdrAPrdcw
8. #BARCAMP BANGKHEN 2015
MV* PROBLEMS
▸ two-way data direction
▸ hard to trace data flow and predict app state
Hacker Way: Rethinking Web App Development at Facebook https://www.youtube.com/watch?v=nYkdrAPrdcw
14. #BARCAMP BANGKHEN 2015
3 PRINCIPLES OF REDUX
▸ Single source of truth
▸ State of whole app in single store
▸ State is read only
▸ No view, network callback will write state directly
▸ (State) mutations are written as pure functions (reducers)
▸ Reducer is (state, action) => new state
16. #BARCAMP BANGKHEN 2015
REDUX THE COOL PARTS
▸ Predictable state
▸ Nested reducers composition
(like nested React components)
▸ Live code editing
▸ Time travel debugging
▸ Easy to test
17. #BARCAMP BANGKHEN 2015
REDUX THE COOL PARTS
Thanks to
▸ Webpack Hot Module Reloading (HMR)
▸ Separate state (single store) from functions (reducers)
▸ Immutable state
▸ Pure functions