Package tangle.inject.compose

Functions

Link copied to clipboard
@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.