tangleViewModel

@Composable
inline fun <VM : ViewModel> tangleViewModel(viewModelStoreOwner: ViewModelStoreOwner = checkNotNull(LocalViewModelStoreOwner.current) { "No ViewModelStoreOwner was provided via LocalViewModelStoreOwner" }): VM

Returns an existing VMInject-annotated ViewModel or creates a new one scoped to the current navigation graph present on the NavController back stack.

Since

0.10.0

Sources

Link copied to clipboard