I see currently `NavHost()` already provides `View...
# compose
k
I see currently
NavHost()
already provides
ViewModelStoreOwner
,
LifecycleOwner
, and
SavedStateRegistryOwner
locals. Is there a function like
scopeViewModels(savedState: Bundle? = null, content @Composable () -> Unit)
that I can use that also scopes all the view models inside content and automatically clear them like
NavHost()
does? I want to use it for dialogs which does not make much sense with
NavHost()
i
There's no support for scoping ViewModels to an arbitrary composable, you can star the feature request: https://issuetracker.google.com/issues/165642391