6.3.0
This is the third minor release of ReactiveSwift 6.
Additions
-
Property
andMutableProperty
can now be used as property wrapper. Note that they remain a reference type container, so it may not be appropriate to use them in types requiring value semantics. (#781)class ViewModel { @MutableProperty var count: Int = 0 func subscribe() { self.$count.producer.startWithValues { print("`count` has changed to \(count)") } } func increment() { print("count prior to increment: \(count)") self.$count.modify { $0 += 1 } } }
-
When
combineLatest
orzip
over a sequence ofSignalProducer
s orProperty
s, you can now specify an optionalemptySentinel
parameter, which would be used when the sequence is empty.This becomes relevant, when the sequence of producers is calculated from some other Signal and the signal resulting from the joined producers is observed. If no value is sent when the sequence is empty, the observer gets terminated silently, and, e.g., the UI would not be updated.
(#774, kudos to @rocketnik)
Miscellaneous
- Test dependencies should no longer be built for SwiftPM users, as a result of ReactiveSwift moving to
swft-tools-version: 5.2
. (#784)