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
Denis A
08/30/2018, 10:23 AM
LiveData + Coroutines
e
edwardwongtl
08/30/2018, 10:27 AM
LiveData between UI and ViewModel, RxJava in other places
a
audax
08/30/2018, 11:43 AM
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.
audax
08/30/2018, 11:44 AM
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.
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
Jakub
08/30/2018, 1:41 PM
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