I am working on a Application in KMM, please suggest any good resource how to use same viewModel in android and in IOS
where UI component are to shared with each other
j
Jonathan
05/13/2025, 1:37 PM
Just add the ViewModel dependency from JetBrains to your commonMain target.
Copy code
androidx-lifecycle-viewmodel = { group = "org.jetbrains.androidx.lifecycle", name = "lifecycle-viewmodel", version.ref = "androidx-lifecycle" }