https://kotlinlang.org logo
#dagger
Title
# dagger
t

trevjones

07/30/2020, 3:38 PM
is it just me or is
@InstallIn
violating inversion of control? if not for the abstract concept of the monolithic component hierarchy creating a dependency inversion boundary it would be cyclic in nature 😕
which is this a product of viewModelStore leaking lifecycle details as soon as you try to do DI and the solution was a mountain of dagger magic rather then fixing the view model library impl? and doesn’t an activity or fragment knowing about the scope(specific store owner) of a viewmodel violate inversion of control
all of which to say I think hilt is doubling down to bandaid over a design issue in viewmodel rather then making library integration of viewmodel a bit harder to actually fix the root issue?
j

Javier

07/30/2020, 4:36 PM
You can use Hilt without ViewModel, and I think there will be people who don't use it
t

trevjones

07/30/2020, 7:11 PM
yeah sure I am just left wondering if the design of hilt was motivated (unintentionally?) by the shortfalls in some of the other androidx packages. and things like installin seem like a dangerous pattern to jump on.
5 Views