-
Notifications
You must be signed in to change notification settings - Fork 130
Files
/
Copy pathcore_components.csv
23 lines (23 loc) · 1.21 KB
/
core_components.csv
1 | RxSwift | Combine | Notes |
---|---|---|---|
2 | AnyObserver | AnySubscriber | |
3 | BehaviorRelay | ❌ | Simple wrapper around BehaviorSubject, could be easily recreated in Combine |
4 | BehaviorSubject | CurrentValueSubject | This seems to be the type that holds @State under the hood |
5 | Completable | ❌ | |
6 | CompositeDisposable | ❌ | |
7 | ConnectableObservableType | ConnectablePublisher | |
8 | Disposable | Cancellable | |
9 | DisposeBag | A collection of AnyCancellables | Call anyCancellable.store(in: &collection), where collection can be an array, a set, or any other RangeReplaceableCollection |
10 | Driver | ObservableObject | Both guarantee no failure, but Driver guarantees delivery on Main Thread. In Combine, SwiftUI recreates the entire view hierarachy on the Main Thread, instead. |
11 | Maybe | Optional.Publisher | |
12 | Observable | Publisher | |
13 | Observer | Subscriber | |
14 | PublishRelay | ❌ | Simple wrapper around PublishSubject, could be easily recreated in Combine |
15 | PublishSubject | PassthroughSubject | |
16 | ReplaySubject | ❌ | |
17 | ScheduledDisposable | ❌ | |
18 | SchedulerType | Scheduler | |
19 | SerialDisposable | ❌ | |
20 | Signal | ❌ | |
21 | Single | Deferred + Future | Future has to be wrapped in a Deferred, or its greedy as opposed to Single's laziness |
22 | SubjectType | Subject | |
23 | TestScheduler | ❌ | There doesn't seem to be an existing testing scheduler for Combine code |