Has anyone seen an example of how should viewmodel...
# compose
u
Has anyone seen an example of how should viewmodel+compose work with dagger? probably to provide the Screen composable woth viewmodel injected somehow?
c
There is official support from jetpack to inject viewmodels into Composables: https://developer.android.com/jetpack/compose/libraries#viewmodel
To tie it together with dagger, I think the easiest way is to use hilt: https://developer.android.com/training/dependency-injection/hilt-jetpack#compose
u
thanks!