Mutable or Immutable? Let's do both!
summary
Introduces MobX-State-Tree as an opinionated library that mixes mutable MobX instances with immutable snapshots and patches, gives runtime types and TypeScript inference, supports time-travel, autosave, undo via reverse patches, and reconciliation via identifier-based reconciliation. Demo shows creating models, applying server snapshots, recording and replaying patches, and Redux-devtools interoperability; examples run and produce snapshots and reversions as claimed, with observable views and cached computed values working end to end.
AI-written summary · about
chapters (21)
- 0:00Start
- 2:42Comparing the opposite patterns
- 3:19Shaping the data
- 4:55Data Rehydration
- 8:00Defining data shape
- 8:58Creating a model instance
- 9:39Getting an instance snapshot
- 12:41What about fancy time travelling?
- 13:48Composing Models
- 16:02Types
- 17:00Typechecking
- 20:16Reconciliation
- 23:10React Lifecycle?
- 26:41Automatic action descriptors
- 27:36Applying an action back
- 28:09Observability
- 31:37Fine grained snapshots?
- 32:27Applying patches
- 37:38State Tree?
- 38:48References
- 39:17Defining a Reference
related talks
34mMutable or Immutable? Why not both!
34mImmer-mutable state management
21mNext-gen React state management with MobX State Tree
25mNext generation state management
32mMobX State Tree React pure reactivity served
41mmobx-state-tree, stop getting into all those states!
41mMobX, or: Going from Mutable to Immutable to Reactive State Management
43mYou don’t know MobX State Tree
