October 2019
Intermediate to advanced
434 pages
11h 54m
English
Reactive programming relies on asynchronous streams of data that can be observed, transformed, and responded to. Reactive programming has gained a great deal of popularity recently with the adoption of Redux and ReactiveX across various languages.
For Java developers, RxJava has become quite popular, especially in the Android development domain. Because of Kotlin's strong interoperability with Java, it's also possible to leverage RxJava and RxKotlin to write reactive code.
The following example demonstrates one way in which reactive code can be written in Kotlin:
studentsObservable .filter { student -> student.grade == 11 } .filter { student -> student.gpa > 3.5 } .subscribeBy( onNext = { displayStudents(it) }, onError ...Read now
Unlock full access