setState demystified
summary
Claim: setState handles most app needs if used correctly, and Redux is often premature. Demonstrates pitfalls (batched updates, non-merged object replacement, mutating this.state), shows patterns and tools: extract updaters into pure functions and test them, lift state up or use react-fetching, react-broadcast, react-lumberjack, t-redux for specific cases. Builds examples of container/presentational components, HOCs for data fetching, a reducer-in-component pattern and working time‑travel logging, all of which run and simplify real code.
AI-written summary · about
chapters (6)
- 0:00Start
- 14:25Container and Presentational
- 17:49Composition
- 26:44Recap
- 27:56Requirements
- 29:35Know your tools
related talks
26mDemystifying setState()
18mDestructuring state management (in React)
28mThe State of React State in 2019
17mManaging React State: 10 Years of Lessons Learned
51mBuilding React Applications with Redux
36mModern React and the case for Reactive State Management
40mManaging Complex State in React
30mReact state management in a GraphQL era
