Open jitinsharma opened 4 years ago
The PeopleInSpace
is pretty simple, similar to what we did earlier. The Repository
is in common module and ViewModel
in android module which then plugs-in to Compose
.
We can use same pattern till ViewModel
part and then decide whether to use compose or not.
KaMPKit looks more promising.
Another architecture variant is MVI-ish: https://github.com/badoo/Reaktive/tree/master/sample-mpp-module
Apps just need to implement views and call binder
lifecycle callbacks. View implementation means: to render a single view model data class and to produce simple view events. Everything else is shared in a common module.
@arkivanov I can see there is Rxjava2/3 interop available for JVM. Is there anything similar for RxSwift as well?
You normally don't need interop with any Rx framework, unless you already have it in your project. Plus you can avoid using Rx from the app sides at all (check the link above). But sometimes you do need to expose Rx from a shared module. In this case you can wrap streams as shown here. So from Android side you can use Reaktive directly. From iOS you will be able to subscribe (and dispose), if you need any operators then you can extend the wrappers with your own classes and add operator delegates there. Answering your question, there is no interop with RxSwift as of now.
https://github.com/badoo/Reaktive https://github.com/joreilly/PeopleInSpace