Scoping States in Jetpack Compose
This is precisely what navigation graph scoped view models are used for. This involves two steps: Finding the NavBackStackEntry associated with the graph you want to scope the ViewModel to Pass that to viewModel(). For part 1), you have two options. If you know the route of the navigation graph (which, in general, you should), … Read more