Hey are there any recommendations how i can simpli...
# android
l
Hey are there any recommendations how i can simplify the creation of a viewmodel across all my features. Right now I have it set up like this. I tried briefly looking into Kotlin delegates but I haven’t come across an example that didnt seem overly complicated. I would like to continue to use Dagger and not switch to a different dependency injection framework.
i
You could look into using Hilt, it'll surely give you a more elegant way to create your ViewModels
m
Yes, you could use hilt... Also, if you want to continue using dagger, you can use android-dagger... finally, androidX provides you some extension function to create a view models
val viewModel by viewModels {  }