Hasan Nagizade
12/19/2022, 5:02 PMLandry Norris
12/19/2022, 5:03 PMHasan Nagizade
12/19/2022, 5:03 PMCorey
12/19/2022, 5:24 PMCorey
12/19/2022, 5:29 PMHasan Nagizade
12/19/2022, 5:30 PMHasan Nagizade
12/19/2022, 5:32 PMCorey
12/19/2022, 5:33 PMexpect
and actual
Since it is only Android for now, you can leave the iOS part empty. I'm doing the same, although I don't have a common VM, I've started with iOS only. Android is fully empty. 😄 😄Hasan Nagizade
12/19/2022, 5:39 PMSam
12/19/2022, 8:40 PMdarkmoon_uk
12/20/2022, 12:49 AMWhat is the official recommended way to keep viewmodels?There's no official recommendation on this, and nor should there be: Your UI architecture is Application specific and this is out-of-scope of Kotlin Multiplatform. KMP is there to support code-sharing, whichever UI architecture you adopt. Generally though, if you're not attempting to share any of your presentation logic at all, then IMO you're missing out on the full benefit of Kotlin Multiplatform. Most of the time (KMM scenario) the View layer requirements are similar enough that it's straightforward to achieve a common (MVVM) ViewModel. Even where the UI differs greatly - for example, where in one of my projects I have a CLI client - you can still use KMP's 'hierarchical source-sets' to achieve e.g.
graphicalMain
that provides common VM sources for `ios`/`android` graphical targets, while the cli
presentation layer can be separate and different.