Answer the question
In order to leave comments, you need to log in
RxJava in 2021. Is it necessary?
From time to time I do development for Android (as a hobby), I study all sorts of innovations, and so on, but that in 2017 I didn’t understand why RxJava was needed, I still can’t understand now. After all, all he offers is streams with subscribers who work in another thread and die after `onComplete` (or am I not understanding correctly?). The year is 2021, coroutines for the background, is it important to continue to understand RxJava?
Answer the question
In order to leave comments, you need to log in
RxJava and coroutines are a little bit different. Rx is about stateless and representing everything as streams of immutable states (data). Coroutines are about stateful and about managing many asynchronous entities.
It so happened that in our multi-threaded world there is concurrency in both approaches. But this does not mean that it is necessary to take and oppose Rx to coroutines.
The request for Rx is so large that flow was brought to kotlinx - this is the same reactive approach, only based on coroutines. What they fought against, what Elizarov preached against, they ran into it, and they also spawned new operators who also need to be known. And they made it extremely difficult.
flowOf(123)
.map(::calculateSomething)
.filter(::myFilter)
.collect(::collectIt)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question