Understanding Combine
summary
Argues that Combine turns familiar collection operations into streams, showing concrete code using UIKit and SwiftUI and the Combine framework to replace delegates and closures with Combine framework publishers. Demonstrates Publishers/Subscribers tying @Published model properties to UILabels, uses map/flatMap/zip/filter operators, builds a working rock‑paper‑scissors demo that colors results and a pipeline decoding JSON from NotificationCenter with a fallback via flatMap. Shows this approach composes, compiles, and runs — operators transform types so UI sinks get the right values.
AI-written summary · about
chapters (10)
- 0:00Introduction to intuition
- 4:17From delegates to closures
- 8:14SwiftUI and Combine preview
- 11:08Target-action in UIKit
- 17:21Combine in UIKit example
- 24:33Map operator intuition
- 28:07Operators and subscribers
- 30:12Map with notifications
- 32:17FlatMap for error handling
- 35:10Summary and Q&A








