Closed russhwolf closed 2 years ago
This PR is the merge of concepts from the various other view model PR's. Adding links here for reference.
https://github.com/touchlab/KaMPKit/pull/206 https://github.com/touchlab/KaMPKit/pull/217 https://github.com/touchlab/KaMPKit/pull/218 https://github.com/touchlab/KaMPKit/pull/231
You should update https://github.com/touchlab/KaMPKit/blob/main/docs/GENERAL_ARCHITECTURE.md with the new structure. Explaining the different layers of viewmodel on native side would be helpful
re readme updates, I think that'll come as part of the separate docs update pass we've been talking about
This is an alternate take on #231 that uses an expect/actual base class in order to avoid one layer of wrapper class on the Android side. This feels nicer in a greenfield context, but has less flexibility to deal with certain scenarios that can come up when migrating a pre-existing app to KMP, such as differences in what functionality is supported per platform, and usage of Android-specific APIs like LiveData.