ReactiveSwift v6.3.0 Release Notes

Release Date: 2020-05-25 // almost 4 years ago
  • 🚀 This is the third minor release of ReactiveSwift 6.0.

    ➕ Additions

    Property and MutableProperty 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 = 0func 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 or zip over a sequence of SignalProducers or Propertys, you can now specify an optional emptySentinel 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

    ✅ 1. Test dependencies should no longer be built for SwiftPM users, as a result of ReactiveSwift moving to swft-tools-version: 5.2. (#784)