The two types of state management
summary
Claims that state libraries fall into easy vs simple categories and demonstrates on a concrete counter (clamped between 0 and 10) how useState, useReducer, context, subscriptions and selectors behave, showing unnecessary re-renders and how reducers plus selectors fix them. Mentions specific libraries—Recoil, Jotai, MobX, Redux Toolkit, Zustand—and presents XState as a state orchestrator with XState v5 alpha and Stately tools, arguing statecharts improve correctness and testability.
AI-written summary · about
chapters (11)
- 0:00State management intro
- 1:14Why state management exists
- 3:17React’s useState limits
- 6:48Sharing state with context
- 9:58Direct vs indirect state
- 13:52Local vs global stores
- 15:40Effect management in state
- 16:44Choosing state management
- 19:11Separating logic from UI
- 20:55Maintainable state practices
- 22:19Summary
related talks
41mThe Battle of State Management in modern frontend applications
32mRevisiting x state x management
52mState management beyond the libraries
28mThe State of React State in 2019
47mThe State of React State Management
18mDestructuring state management (in React)
31mXState: the Visual Future of State Management
36mModern React and the case for Reactive State Management
