We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91ea6d8 commit be1ac7aCopy full SHA for be1ac7a
2 files changed
CHANGELOG.md
@@ -1,5 +1,10 @@
1
#Upcoming Release
2
3
+#4.0.1
4
+**API Changes:**
5
+
6
+- `dispatch(_ stream:)` now returns a subscription reference.
7
8
#3.0.6
9
**Breaking API Changes:**
10
Sources/CoreTypes/Store.swift
@@ -35,9 +35,12 @@ open class Store<ObservableProperty: ObservablePropertyType> {
35
}
36
37
38
- public func dispatch<S: StreamType>(_ stream: S) where S.ValueType: Action {
39
- disposeBag += stream.subscribe { [unowned self] action in
+ @discardableResult
+ public func dispatch<S: StreamType>(_ stream: S) -> SubscriptionReferenceType? where S.ValueType: Action {
40
+ let disposable = stream.subscribe { [unowned self] action in
41
self.dispatch(action)
42
43
+ disposeBag += disposable
44
+ return disposable
45
46
0 commit comments