ValueObservation
extension ValueObservation where Reducer: ValueReducer
Combine extensions on ValueObservation.
-
Returns a publisher that tracks changes in the database.
It emits all fresh values, and its eventual error completion, on the main queue.
By default, the publisher can be subscribed from any dispatch queue, and emits a first value asynchronously.
You can force the publisher to start synchronously with the
fetchOnSubscription()
method. Subscription must then happen from the main queue, or you will get a fatal error.Declaration
Swift
public func publisher(in reader: DatabaseReader) -> DatabasePublishers.Value<Reducer.Value>