Search code examples
swiftrx-swiftrx-cocoa

RxSwift 4/RxCocoa 4 Deprecating Variable - pros and cons


In the future, Variable will be deprecated in RxSwift 4. Instead, Relay classes were first implemented in RxCocoa 4, and an alternate proposed to Variable is BehaviorRelay.

Assigning the value of a Variable is an imperative programming-style command. Its convenient but not belongs in Reactive’s declarative programming environment.

What are their pros and cons?


Solution

  • I recommend you read this post (or maybe all thread) to find out some user-friendly explanation about Variable and Driver.