0.5.0
Update dependencies
- Kotlin
1.9.0
. - AndroidX Lifecycle
2.6.1
. - KotlinX Coroutines
1.7.3
. - Android Gradle Plugin
8.1.0
.
viewmodel
- Add
ViewModelStore
andViewModelStoreOwner
. - Add
ViewModelFactory
andVIEW_MODEL_KEY
. - Add
CreationExtras
andCreationExtrasKey
. - Add
buildCreationExtras
andCreationExtras.edit
. - Add
ViewModel.isCleared()
method to check if theViewModel
is cleared, only available on
non-Android targets. - Add
MainThread
(moved fromviewmodel-savedstate
module).
viewmodel-savedstate
- Remove
MainThread
(moved toviewmodel
module). - Add
SavedStateHandleFactory
interface. - Add
SAVED_STATE_HANDLE_FACTORY_KEY
andCreationExtras.createSavedStateHandle()
.
viewmodel-compose
-
A new module allows to access
ViewModel
s in Jetpack Compose Multiplatform.kmpViewModel
to retrieveViewModel
s in @composable functions.LocalSavedStateHandleFactory
andSavedStateHandleFactoryProvider
to
get/provideSavedStateHandleFactory
in @composable functions.
It allows integration with any navigation library.LocalViewModelStoreOwner
andViewModelStoreOwnerProvider
to
get/provideViewModelStoreOwner
in @composable functions.
It allows integration with any navigation library.defaultPlatformCreationExtras
anddefaultPlatformViewModelStoreOwner
to get the defaultCreationExtras
andViewModelStoreOwner
,
which depends on the platform.
-
Dependencies: Compose Multiplatform 1.5.0.
-
Docs: 0.x Viewmodel-Compose docs.
Example, docs and tests
-
Refactor example code.
-
Add Compose Multiplatform sample
which sharesViewModel
s and integrates withNavigation
in Compose Multiplatform. -
Add Compose Multiplatform KmpViewModel KMM Unsplash Sample,
a KMP template of the Unsplash App using Compose multiplatform for Android, Desktop, iOS.
Share everything including data, domain, presentation, and UI. -
Add more docs: 0.x docs.
-
Add more tests.