Hi I was curious, Couroutines Vs RxJava ? Which on...
# android
l
Hi I was curious, Couroutines Vs RxJava ? Which one is more suitable in your opinion ? For me it's Rx mainly because I have more experience with it, but what do you guys think ?
c
I haven’t done much with the “reactive” side of RxJava (
Observable
), but I’ve found that coroutines work better and feel more much more natural than
Single
👍 1
l
Well, I am using also flowables for continuous loading from room DB
l
Coroutines have an analogue to
Flowable
, it's
Flow
I find these, and coroutines overall simpler from a beginner standpoint, although it's now been close to 2 years using coroutines almost everyday for me.
l
Oh, didn't know that :O Do you have also a recommended article I can follow ? :) @louiscad
l
@Lukas Anda All small recent articles (since structured concurrency) from Roman Elizarov on Medium are great.
👆 5
e
In my opinion in the average Android project Coroutines should be the go to solution. In most of the development done on Android Rx is an overkill and the 90% of its use is to change the context of async calls. And with the new lifecycle scopes, etc, in the Android side implementing it in coroutines is easiser and easier every day
☝🏽 3
l
Totally personal experience here (hopefully not setting myself up for getting hit with a stick!). In my opinion RxJava was easier to learn and use, but yes definitely overkill since I don't use 90% of its functionality. I learned coroutines when they were experimental and liked using them. I found great sample projects and documentation. https://github.com/dmytrodanylyk/android-architecture/tree/todo-mvp-kotlin-coroutines When they became stable I sort of felt like I didn't know how to use them anymore. Also had some difficulty in implementing them together with MVVM. I found the google codelab for couroutines to be a bit confusing too.