Developer
Developer

Reputation: 53

Is it OK to use Kotlin Coroutines and RxJava2 in the same project?

In the project I am working on, I am using the MVP architecture. In Presenter classes network requests are executed with RxJava2. Is it OK to use Kotlin Coroutines as well?

Upvotes: 1

Views: 205

Answers (1)

Can_of_awe
Can_of_awe

Reputation: 1556

Yes.

For example, you might want to use coroutines for light-weight async tasks, while using RxJava for getting a stream of items and transforming the stream into another one using complex operations. They are just two different tools and approaches to asynchronous programming.

Upvotes: 3

Related Questions