Prashant Rane Prashant Rane - 1 year ago 92
Android Question

Is a Component optional to use in Dagger 2?

Answer Source

First, please note that Dagger 2 and Dagger are not the same thing. If you read ObjectGraph you are probably reading about Dagger (1).

You can not use Dagger 2 without components. Components are the objects that hold your dependencies and know how to provide and inject them. I think the same holds true for Dagger 1 about their ObjectGraph. If you don't have the means to provide your dependencies, you can't use DI.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download