icerockdev / moko-widgets

Multiplatform UI DSL with screen management in common code for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev
Apache License 2.0
388 stars 32 forks source link

Can't create multiple ViewModel on a same Screen #239

Closed Tetraquark closed 4 years ago

Tetraquark commented 4 years ago

When you try to create multiple ViewModel on a same screen, for iOS appears kotlin.ClassCastException during getViewModel function call. On Android onCleared function is called for previously created ViewModel.