Dagger needs too many modules and code blocks inside them.
5 лет назад
Dagger is garbage, say, I have a hundred activities all using shared preferences. I have to declare a 100 activities to inject them for shared preferences. You'd think, Dagger could handle a silly simpleton scenario such as this, but, hey, its Dagger. Anything to declare Jake?
Why do you even have 100 Activities and why are you not using 1 global Dagger instance that exposes SharedPreferences as a provision method? Boom you no longer need 100 inject method calls, GG your turn
how we write this statement in java
lateinit va userId : String
this is a lazy initialization, you could search for it
`String userId;` you're welcome.
Dagger needs too many modules and code blocks inside them.
Dagger is garbage, say, I have a hundred activities all using shared preferences. I have to declare a 100 activities to inject them for shared preferences. You'd think, Dagger could handle a silly simpleton scenario such as this, but, hey, its Dagger. Anything to declare Jake?
Why do you even have 100 Activities and why are you not using 1 global Dagger instance that exposes SharedPreferences as a provision method? Boom you no longer need 100 inject method calls, GG your turn