icerockdev / moko-mvvm

Model-View-ViewModel architecture components for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev/
Apache License 2.0
994 stars 95 forks source link

Is it supported in web and desktop as well? #248

Open sunildhiman90 opened 11 months ago

sunildhiman90 commented 11 months ago

Hi moko-mvvm is great option for android and ios. But i just wanted to know, can we use it for web and desktop as well?

Are there any extra configurations we need to do in web and desktop?

Thanks

Alex009 commented 11 months ago

Yes, you can. Check https://github.com/icerockdev/moko-compose-multiplatform-template

sunildhiman90 commented 10 months ago

Ok great, Thanx, But if we can update this in docs as well, it will be great. Otherwise developers looking solution for all platforms may come and go thinking that it only supports android and ios but not web and desktop. thnx btw, how its lifecycle will be handled in web side?

Alex009 commented 10 months ago

here platform list in readme

image

but you can send pull request with additional info :)

on web side lifecycle same as on ios and jvm - based on composable dispose event.

https://github.com/icerockdev/moko-mvvm/blob/80b6e45d1d007188087ad0bdd8aa15b032e50181/mvvm-compose/src/nonAndroidMain/kotlin/dev/icerock/moko/mvvm/compose/getViewModel.nonAndroid.kt#L22

sunildhiman90 commented 10 months ago

Ok, Sure i would like to update it. But currently i am working on some other projects. I am planning to create a compose Multiplatform app very soon for all platforms completely using moko libraries such as moko resources, moko mvvm and some others as well. Once i will work on that, I will be happy to create pull request for support of moko mvvm in web and desktop here for readme. Thnx