What would you use for a greenfield reactive app: ...
# android
j
What would you use for a greenfield reactive app: LiveData, RxJava or Coroutines? If you would mix them, which layer would you use which?
d
LiveData + Coroutines
e
LiveData between UI and ViewModel, RxJava in other places
a
I only use RxJava and Coroutines. The only LiveData stuff I use is from Room, which just gets converted to Rx with the supplied adapter. I am very pleased with this.
Coroutines and Channels for the very light stuff and Rx for everything. It's great that I can use coroutines with Rx and it's a pleasure to use.
a
LiveData -> ViewModels RxJava -> useCase, repository, viewModels views -> rxbinding
k
Depends on application, but I would stay with RxJava, it has less performance overhead than LiveData and its way easier to find good devs and documentation for Rx than for coroutines.
j
Thanks guys, I’ll stick to LD in ViewModel layer, cause plays nicely with databinding and is lifecycle aware. Will do simple project with coroutines & RxJava on other layers and see what “works better”. Thanks for sharing