Advanced Patterns for Functional Reactive Programming in Swift
summary
Shows concrete, production-proven patterns using ReactiveCocoa for Swift: converting callbacks to SignalProducer with a reusable wrapper, using flatMap (merge/concat/latest) to sequence or cancel async work, and scan for state to keep counters immutable across observers. Covers modeling UI (alerts, buttons) as signals, retry and materialize to prevent error storms, and examples pulled straight from a codebase with runnable sample code on GitHub so the patterns actually work in production.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 0:45Who uses FRP libraries
- 1:29Why use flat map
- 3:13Converting callbacks to signals
- 5:17UI as asynchronous tasks
- 6:42Modeling button events early
- 7:45Signal producer for UI actions
- 8:49Flat map for filtering and mapping
- 9:53Complex control flow with signals
- 12:02Flat map strategies explained
- 14:10Managing state with scan
- 18:27Counter with plus and minus buttons
- 20:17Handling errors in signals
- 23:32Error recovery techniques
- 24:37Q&A session
- 24:57Apple API updates impact
- 26:00Adopting FRP in projects
- 27:45Onboarding new developers
- 28:57Testing FRP code
- 30:42Debugging challenges
- 31:27Side effects in chains
