Hello! I’m writing a library for KMM, and I would ...
# multiplatform
n
Hello! I’m writing a library for KMM, and I would need to have: commonMain/…/RxUtils.kt:
Copy code
expect class Observable<T>
androidMain/…/RxUtils.kt:
Copy code
actual typealias Observable<T> = io.reactivex.rxjava3.core.Observable<T>
…but:
s
expect/actual is a bit strict on the API signatures
n
Is there a way to work around this?
s
I’d suggest using a first-party library instead, something like reaktive: https://github.com/badoo/Reaktive or flow (is it ready yet?)
also see #reaktive
n
The drawback of using Reaktive (if I understood it correctly) is that the library’s methods return types will also be Reaktive types, no?
I just saw this
And it seems to solve all of my problems
Thanks!
s
you can always transform to platform streams
n
Perfect, thanks!