Has anyone here tried using the RxJava3 extensions...
# compose-desktop
r
Has anyone here tried using the RxJava3 extensions for Compose in Compose Desktop? I have the right maven coordinates in my build.gradle.kts dependencies block, but IntelliJ can't resolve the
subscribeAsState
functions outlined in the docs here https://developer.android.com/reference/kotlin/androidx/compose/runtime/rxjava3/package-summary
I directly copy/pasted the Gradle Kotlin Script implementation line there for my build file, but it doesn't seem to get picked up
a
At first glance it looks like an Android library, e.g. the artifact is aar. Not sure why it's not a java library.
r
Oh wow, yeah I did not catch that thanks for pointing that out. And I agree, not sure why that's not a Java library
a
Yeah, I would just copy-paste them.
Also just in case, if you are working on a greenfield project and prefer Rx, I would also recommend checking out https://github.com/badoo/Reaktive
r
Ooo this looks pretty nice at first glance - wonder why it hasn't made it to the official ReactiveX org
Oh I see, it's already part of the Badoo Tech org, ignore me
Thanks for sharing!
a
Sadly, the reactivex website looks unmaintained. I filed an issue to add Reaktive a couple of years ago https://github.com/ReactiveX/reactivex.github.io/pull/396
r
That's surprising 🤔 I would have thought that community too big for it to go unmaintained like that
There has been RxKotlin for a while, but last time I looked at it it was pretty minimal
a
RxKotlin is just a set of Kotlin extensions on top of RxJava. Reaktive is KMP Rx from scratch.
r
Right I would think Reaktive would deprecate and replace RxKotlin
Not sure why it's not a java library.
Because the runtime is an AAR and you can't have a jar depend on an aar
Curious why you want to use it, though? Flow is superior in every way and you can use the coroutines extensions to convert an observable to flow long before you UI sees it.
r
Just trying to make the learning curve a little less steep. Compose and coroutines are both new to me, but I'm pretty familiar with RxJava so using it instead of Flow for now helps. Plan was "RxJava3 now, migrate to Flow later".
If you have any reference materials for learning coroutines that you stand behind and wouldn't mind sharing that would be awesome