hiltViewModel

@Composable
inline fun <T : ViewModel> hiltViewModel(viewModelProviderFactory: ViewModelProvider.Factory? = null): T

Provide an instance of ViewModel annotated with @HiltViewModel scoped to the destination Route's LifecycleController which is a ViewModelStoreOwner.

This ViewModel will be tied to the current destination & will be cleared when the destination is removed from the backstack.