Use RxSwift, driver and bind to

This is the first time I am asking a question, I am studying RxSwift, how to use binding and driver, what is the difference between a driver and binding to. Anyone else, studying RxSwift now. If you are learning RxSwift or Swift or OC, I hope we can be friends and learn from each other.

+4
source share
2 answers

I suggest you read the documentation for RxSwift Units , for example Driver.

Why use units?

Swift has a powerful type system that can be used to improve the correctness and stability of applications and allows you to use Rx more intuitive and simple experience.

, , , , , (, Driver drive).

, , , , .

Driver

, . , :

.

Driver

, .

RxSwift Slack, RxSwift-ers.:)

  • RxSwift.
+5

@iwillnot , :

, :

let intObservable = sequenceOf(1, 2, 3, 4, 5, 6)
    .observeOn(MainScheduler.sharedInstance)
    .catchErrorJustReturn(1)
    .map { $0 + 1 }
    .filter { $0 < 5 }
    .shareReplay(1)

@iwillnot :

Driver , . , : - - -

Driver, observeOn, shareReplay catchErrorJustReturn.

, , Driver:

let intDriver = sequenceOf(1, 2, 3, 4, 5, 6)
    .asDriver(onErrorJustReturn: 1)
    .map { $0 + 1 }
    .filter { $0 < 5 }

+3

Source: https://habr.com/ru/post/1673517/


All Articles