PassthroughSubject and CurrentValueSubject
Using subjects as bridges between imperative code and Combine pipelines.
Welcome
Subjects are both publishers and subscribers. They bridge imperative code to reactive Combine pipelines.
PassthroughSubject
```swift
let subject = PassthroughSubject()
subject.sink { print($0) }.store(in: &cancellables)
subject.send("Hello")
subject.send("World")
// Hello, World
```
Late subscribers miss previously sent values.
All lessons in this course
- Publishers and Subscribers
- Operators: map, filter, combineLatest
- PassthroughSubject and CurrentValueSubject
- Networking with Combine and URLSession