Skip to content

2.1.0

Compare
Choose a tag to compare
@devxoul devxoul released this 19 Apr 07:15
· 134 commits to master since this release
  • Guarantee thread safety (#126)
  • Add an availability to specify a scheduler (#128)
  • Fix a crash in Mac Catalyst (#129, @mariohahn)
  • Import RxSwift with @_exported attribute (#130)
  • Ensure that mutate and reduce are executed in the same serial scheduler (#131)
  • Ensure that the last published state can be observed immediately (#135, @wplong11)
  • Introduce IdentityEquatable and IdentityHashable (#136)
  • Use WeakMapTable from dependency (#138)

⚠️ Breaking Change Notice

This version contains a potential breaking API change (#128). Reactors will no longer force to observe states in the main thread. Since the default scheduler is changed to CurrentThreadScheduler, you need to specify an observer if there is a UI binding on a non-main thread:

performOnBackgroundThread {
  reactor.state.map { $0.someText }
    .observeOn(MainScheduler.instance)
    .bind(to: myLabel.rx.text)
}

Alternatively, you can use the Scheduling API to specify the scheduler:

class MyReactor {
  let scheduler: Scheduler = MainScheduler.instance
}