Could anyone tell us the difference between the Ko...
# rx
m
Could anyone tell us the difference between the Kotlin Flow api and Rxjava, is it a Kotlin implementation for the reactive extension or is it a different thing
k
Flow is a coroutines based cold asynchronous stream solution just as reactive streams. You can interop with RxJava2.
As far as I know there are a few operators implemented for Flow but not the whole reactive extensions specification
g
Flow isn’t implement reactive extension interfaces, but provides reactive extensions adapter
👍 1
j
...which is what RxJava should have done and technically does
👍 1
m
if I understands that clearly .. in Flow items will not be emitted unless there is a consumer .. but it also it hasn't the full RX interfaces .. but to maintain playing well with Rx there is an Adapter to be able to switching between flow and Rxjava for example
g
in Flow items will not be emitted unless there is a consumer
Yes, but same as Rx
but to maintain playing well with Rx
It's kinda abstract, adapter is just a function that creates Rx types or allows to convert Rx abstractions to coroutines
m
cool, I got it now