WHY, HOW & WHAT OF STATE MANAGEMENT - Communicate effectively through deeply nested component tree - Publish consistent amount of features over time - Built more trust in code base - Deliver a product having a great user experience
Store is setup 2. How a Component dispatches an Action 3. How an Action is built 4. How a Reducer processes an Action export function reducer(state = initialState, action: CraftWarshipAct switch (action.type) { case CraftWarshipActionTypes.ChooseWarshipPlanSuccess: case CraftWarshipActionTypes.RecoverWarshipPlanSuccess: return { ...state, current: action.payload }; default: return state; } }
It is a comitment made by the whole developer team. 2. It guides you through the process of modeling application state. 3. It opens a new world analyzing your app. TEAM REQUIREMENTS TOOLING
Distributed Setup (Actions, Reducers, Selectors, Effects) It is easy to forget parts of the setup (ActionType) High Learning Curve Lot‘s of things happen behind the scenes
of an action 2. … an Action knows about it‘s case reducer 3. … an Acion could dispatch itself 4. … we have one object strucure providing us every thing we need?
saves us for mistakes Serves Open Closed Principle Supports AoT Supports AoT … ` Setting up Dynamic Services is hard Could improve handling for Effects