Android ViewModel
By default Voyager provides its own LocalViewModelStoreOwner
and LocalSavedStateRegistryOwner
, that way you can safely create ViewModel
s without depending on Activity
or Fragment
.
Voyager provides a similar implementation, the ScreenModel, which does the same as ViewModel
but also works with Compose Multiplatform.
Sample
Source code here.
Last updated