Kapil Godhwani
07/10/2020, 4:15 PMNativeViewModel
in the shared code. Wondering if that is needed for avoiding any concurrency issues on native or is it because android ends up using the standard android ViewModel
component and we are trying to create a VM for Native with almost the same functionality except android specific one.
Another query I had was, if instead of doing a MVVM architecture, if I create a project structure in MVP(going a bit old school), can I put both my Model and Presenter in common code and avoid creating 2 different ViewModels that are platform specific. Considering KaMP kit uses MVVM, I am sure this debate would have come up in the past and would be very glad if you could share its outcome and avoid me some future pains 😂.russhwolf
07/10/2020, 4:36 PMViewModel
. Then NativeViewModel
is a place where iOS can handle scoping in parallel fashion. It also gives a layer for the native side to convert suspend functions to callbacks for consumption from Swift, which isn't necessary for Android since it's coroutine-aware the whole way through.russhwolf
07/10/2020, 4:39 PMKapil Godhwani
07/10/2020, 5:06 PM