Modelling Redux State
summary
Explains concrete rules for Redux/ngrx state: stop nesting JSON and normalize and de-nest JSON so entities live in top-level “tables”; store entities as dictionaries with an entities: { ids, entities } shape to avoid duplicates and huge reducers; use the ngrx/entity adapter to convert arrays to dictionaries, provide add/update/remove helpers and entity-scoped loading/error flags; compose memoized composable selectors to query related records without expensive filters; result is simpler reducer logic, fewer renders and fast lookups by ID.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 3:06The Store
- 5:10Store Types
- 6:08Store Anti Patterns
- 8:52The Problem
- 12:30Example
- 12:54Relationships
- 13:30NGRX Entity
- 14:55Defining Properties
- 16:12Entity State
- 17:45Entity Adapter
- 19:11Initial State
- 21:03user adapter usage
- 21:42selectors
- 21:57selectors benefits
- 22:48adapter selectors
- 23:52big arrow functions
- 24:47how to use this within a component
- 25:29how to use this in HTML
- 26:18how to use this in relational data
related talks
26mWhy nobody told me about ngrx entity
44mReducing the Boilerplate with NgRx
22mThe Secret Sauce of State Management
23mState management with ngrx
34mNgRx: Tips & Tricks
27mCrafting state management – A principle based architecture
32mThere and Back Again: Grokking State and Data
30mMake React State-Management great again
