Kotlin Multiplatform ViewModel. Kotlin Multiplatform MVVM. Common/Shared ViewModel in Kotlin Multiplatform - A Kotlin Multiplatform library that provides shared MVVM for UI applications. Components are lifecycle-aware on Android. Supports Android Parcelable, Kotlin Parcelize, AndroidX SavedState...
The kmp-viewmodel is a Kotlin Multiplatform library that provides shared MVVM for UI applications. It supports Android Parcelable, Kotlin Parcelize, and AndroidX SavedStateHandle for state restoration after process death. It also offers easy interoperability with Swift/Objective-C and SwiftUI, and supports Compose Multiplatform Framework for various platforms. The ViewModel class serves as a business logic or screen level state holder, exposing state to the UI and encapsulating related business logic. Its main advantage is that it caches state and persists it through configuration changes on Android. The library is available on Maven Central and is licensed under MIT.
The kmp-viewmodel library is a Kotlin Multiplatform solution for implementing shared MVVM in UI applications. It offers various features like support for Android Parcelable, Kotlin Parcelize, and AndroidX SavedStateHandle, easy interoperability with Swift/Objective-C and SwiftUI, and compatibility with Compose Multiplatform Framework. The ViewModel class is a powerful tool for maintaining state and encapsulating business logic. Overall, this library provides a convenient and efficient way to develop UI applications using Kotlin Multiplatform.