combine-framework
Installation
SKILL.md
Combine Framework
Reactive programming with Apple's Combine framework.
See also: Combine is the legacy reactive stack. For new SwiftUI state, prefer the Observation framework (@Observable) — see the swiftui-observation skill. Reach for Combine for existing ObservableObject/@Published code, custom publisher pipelines, and event streams.
Core Concepts
Publisher & Subscriber
// ✅ Basic subscription
let publisher = Just("Hello")
let cancellable = publisher.sink { value in
print(value) // "Hello"
} // sink returns AnyCancellable, not a Subscriber