is scoped to NavBackEntry by default. But you can pass "parent"
(the ambient value passed to given
) as your own ambient.
I pass Activity that way (using custom
) to scope few viewmodels that are used everywhere to Activity
1 year ago
Ok cool, so I think thats working. I’m using Hilt to inject some dependencies into my ViewModel, which fails now because I’m creating the ViewModel with a ViewModelProvider. I think I need to pass a ViewModelProvider.Factory but I’m not sure where to get it in compose. Previously in fragments I was using