icerockdev / moko-mvvm

Model-View-ViewModel architecture components for mobile (android & ios) Kotlin Multiplatform development

Home Page:https://moko.icerock.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to use viewModel with Koin (ViewModel error from composable)

sodiqOladeni opened this issue · comments

I got this compile time error after adding viewModel() to the composable, this declaration in composable.

  • viewModel: EmailInputScreenViewModel = viewModel()

Cannot access 'dev.icerock.moko.mvvm.viewmodel.ViewModel' which is a supertype of 'com.apppackage.viewmodel.ftue.EmailInputScreenViewModel'. Check your module classpath for missing or conflicting dependencies

Is there any sample project that uses Moko-Viewmodel + Koin + Compose, Is there any other thind

Screenshot 2022-09-13 at 5 47 33 PM

change implementation to api