Put it All in State
summary
Argues that UI state must include every side-effect source so the view is derived from denormalized state and event metadata rather than just mutable fields. Demonstrates with a React Native Expo playground: a spinner that breaks when a timer and pull-to-refresh race, fixed by splitting flags and computing isLoading = isRefreshing || isMessagesLoading; a draft form where cache and network responses clobber edits, solved by tracking didEdit and merging via useQuery + useMemo; a collaborative demo that stores UI and network values plus author info so a “use network” button reconciles changes.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:09Traditional dynamic UI state
- 2:56Side effects as state
- 4:41Live demo: spinner example
- 9:47Draft state vs network response
- 13:23Fixing draft state
- 21:34Collaborative editing reconciliation
- 25:34Key takeaways
related talks
30mManaging State Management
34mFunctional UIs and Unidirectional Dataflow
24mGoodbye, useState
40mRethinking UI: Imperative to Declarative
52mState management beyond the libraries
25mDriving View-State through Data for Fun and/or Debugging
30mMastering UIs with Finite State Machines
28mThe State of React State in 2019
