0
After the LiveData
was introduced as architecture component of Jetpack, I have seen much discussion about the use of it. The most common is that it is used in the layer viewmodel
of MVVM, standard recommended by architectural guide to Android.
I know that the LiveData
is prepared to handle the application lifecycle, either from a Activity, one Fragment or a service. And I also know that the resource universe of livedata
is much smaller than the RxJava
. I also know that the Livedata is synchronous and Rxjava is asynchronous, but this can be solved with the corroding in Kotlin.
Much is said about using the livedata
in the layer viewmodel
, but I’ve seen several codelabs of Google showing the use of livedata
in the repository and also with the Room
, for example, see these links:
Advanced Coroutines with Kotlin Flow and Livedata
So there is some practical reason or situation why I should choose to use Rxjava (or Rxjava2 / Rxkotlin) instead of using Livedata in conjunction with Corrotinas and other components of Jetpack?