The Art of Functional State Management
summary
Shows concrete patterns: use immutable state and pure functions to avoid accidental mutations, implement a counter where a Published Int is bound to a label via Combine publishers and subscribers, and implement a user‑profile fetch that uses map, decode and assign with stored cancellables. Compares Combine vs async/await and shows migrating CurrentValueSubject to an AsyncSequence/AsyncChannel and replacing receive(on: .main) with @MainActor and for‑await loops. Notes Observation macro (iOS 17+) as a lighter alternative.
AI-written summary · about
chapters (11)
- 0:00Introduction to talk
- 1:48Functional programming principles
- 6:02Reactive programming explained
- 8:50Combine framework overview
- 12:24Traditional vs Combine state
- 14:33Network requests with Combine
- 17:02Combine vs async/await
- 20:37Observation framework
- 24:54Migrating from Combine
- 29:55Key takeaways summary
- 31:59Q&A session
related talks
28mThe Art of Functional State Management
19mThe Art of Functional State Management for iOS Apps
20mSubjecting State to Good Behavior
38mThe Actor Model: a new mental model for React
28mThe two ways to manage state
44mState Machines and Hopeful Dreams
32mThere and Back Again: Grokking State and Data
30mCONQUERING CONCURRENCY WITH FUNCTIONAL PROGRAMMING
