A library for reactive and unidirectional Swift applications
Full Changelog: https://github.com/ReactorKit/ReactorKit/compare/3.1.0...3.2.0
@_exported
attribute (#130)IdentityEquatable
and IdentityHashable
(#136)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
}
Reactor.isStubEnabled
and deprecate Stub.isEnabled
for the runtime performance. (e813112e4497a66f046e1fa0e9783adbace388bf)Special thanks to @mariohahn and @tokijh 🎉
StateRelay
as a replacement of Variable
(#82, @tokijh)action
(#49, @creasty)