Hello everyone, I need suggestion from you guys , Recently google has announced Hilt dependency injection on Android over the dagger 2 dependency injection , So should i learn dagger 2 first and then go with the hilt dependency ?? Or should i directly continue with Hilt dependency ???
03/07/2023, 8:11 AM
Can you share the announcement page or video?
03/08/2023, 6:51 AM
Hilt is just a wrapper around Dagger 2, the learning curve is smaller, but Hilt is alot more opinionated with it’s approach and scoping.
I’d suggest the reverse if you’re just starting out, try Hilt out and if you want to demystify some of the magic you can try to setup a plain Dagger 2 project.
03/08/2023, 8:03 AM
IMHO, just go for Hilt. Many things have been simplified there
03/08/2023, 8:59 AM
He is saying hilt was over Dagger(1) but now over Dagger(2). But I never seen that announcement yet.
03/08/2023, 9:03 AM
Dagger 1 was an old Square library which got archived and used reflection.
Hilt is a wrapper around Dagger 2, not Dagger 1 🙂, the TLDR is try out Hilt first.