@@ -102,31 +102,27 @@ public final class ViewStore<State, Action> {
102
102
}
103
103
}
104
104
105
- /// A publisher that emits when state changes.
105
+ /// A `SignalProducerConvertible` that emits when state changes.
106
106
///
107
- /// This publisher supports dynamic member lookup so that you can pluck out a specific field in
107
+ /// This producer supports dynamic member lookup so that you can pluck out a specific field in
108
108
/// the state:
109
109
///
110
110
/// ```swift
111
- /// viewStore.publisher .alert
112
- /// .sink { ... }
111
+ /// viewStore.produced .alert
112
+ /// .startWithValues { ... }
113
113
/// ```
114
114
///
115
115
/// When the emission happens the ``ViewStore``'s state has been updated, and so the following
116
116
/// precondition will pass:
117
117
///
118
118
/// ```swift
119
- /// viewStore.publisher
120
- /// .sink { precondition($0 == viewStore.state) }
119
+ /// viewStore.produced.producer
120
+ /// .startWithValues { precondition($0 == viewStore.state) }
121
121
/// ```
122
122
///
123
123
/// This means you can either use the value passed to the closure or you can reach into
124
124
/// `viewStore.state` directly.
125
125
///
126
- /// - Note: Due to a bug in Combine (or feature?), the order you `.sink` on a publisher has no
127
- /// bearing on the order the `.sink` closures are called. This means the work performed inside
128
- /// `viewStore.publisher.sink` closures should be completely independent of each other.
129
- /// Later closures cannot assume that earlier ones have already run.
130
126
public var produced : StoreProducer < State > {
131
127
StoreProducer ( viewStore: self )
132
128
}
0 commit comments