Hey, since we won't need multiple fragments anymore with compose navigation and can go single activity, what would be the best practice for injecting viewmodels with
hilt? Injecting them all in the activity and then pass them down?
a
allan.conda
10/20/2020, 11:12 AM
probably nav-graph scoped viewmodels
βοΈ 4
p
P.J.
10/20/2020, 11:22 AM
Cheers. How would one achieve that? Still fairly new to programming & android in general, couldn't find a fitting scope annotation in the hilt docs.
Still fairly new to programming & android in general,
Best of luck π , Dagger already has a high learning curve, and Hilt is just something that supports Dagger. Though Hilt is supposed to simplify things
π 1
π 1
allan.conda
10/20/2020, 11:27 AM
Compose is working on built-in support for scoping viewModels within a Composable AFAIK, but itβs not yet available