Prashant Rane Prashant Rane - 2 months ago 16
Android Question

Is a Component optional to use in Dagger 2?

Answer

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.