DEV Community

Janak  bista
Janak bista

Posted on • Updated on

Hilt Dependency Injection

Hilt is a dependency injection library for Android that reduces the boilerplate of doing manual dependency injection.

Doing manual dependency injection requires to construct every class and its dependencies by hand, and to use containers to reuse and manage dependencies.

Hilt provides a standard way to use DI in your application by providing containers for every Android class in your project and managing their lifecycles automatically.

var a = "string"

Hilt is built on top of the popular DI library Dagger to benefit from the compile-time correctness, runtime performance, scalability, and Android Studio support that Dagger provides. For more information, see Hilt and Dagger.

Top comments (0)