Hi, does anyone have some sample project with kmm-...
# compose-ios
Hi, does anyone have some sample project with kmm-viewmodel + compose-multiplatform for iOS and Android. I was looking into how to hoist state properly using these 2 libs 😃
👍 1
I am working on such project and this particular part implement absolutely the same way as it would be in native android development. You fallback the common base viewmodel to expect/actual so you can extend it from androidx ViewModel for android part. And you might need to implement expect/actual getViewModel() composable to provide the viewmodel into the compose if you DI library doesn't provide that out of the box for KMP just yet
do you have a sample maybe?
Don’t I have to instantiate the viewmodel inside .swift main file?