I'm playing around with Jetpack Compose as well an...
# reaktive
s
I'm playing around with Jetpack Compose as well and I saw this https://developer.android.com/reference/kotlin/androidx/compose/runtime/rxjava2/package-summary So I'm assuming the path of least resistance for me would be something like
Copy code
@Composeable 
fun Foo() {
  val state by someReaktiveSingle.asRxJava2SingleSource().subscribeAsState()
  ...
}
Does that make sense? Where should the conversion from Reaktive to rx2 happen? It shouldn't really happen in the
commonMain
layer, right? iOS won't know what to do with it
(maybe this is a moot point, if I'll use Decompose as well.. not sure yet, just exploring currently)
a
It should be very easy to just port those extensions to Reaktive in your project.
s
yeah, of course I'll wrap it in a shorter form so I don't have to write all of this out every time. btw what's the difference between
asRxJava2SingleSource
and
asRxJava2Single
? When would I explicitly want Source and not just Single?
a
I meant you can just copy those extensions into your project and port them to Reaktive, so no RxJava involved.
s
oh the actual implementation of Google's
.subscribeAsState
? yeah that's a good idea actually, didn't think of that
a
btw what's the difference between
asRxJava2SingleSource
and
asRxJava2Single
?
The difference is in the return type, but I don't remember why they both exist at the same time. 🙂
s

https://tenor.com/rIS6.gifâ–¾

a
Awesome! Thanks for sharing!