Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 709 Bytes

README.md

File metadata and controls

15 lines (11 loc) · 709 Bytes

Dagger 2

My YouTube videos:

Official documentation

Brief Explanations

  • @Module class - "Dagger, this is how to create my dependencies"
  • @Component class - "Dagger, these are my @Modules, please build the dependency graph"
  • @Inject constructor - "Dagger, please use this constructor to instantiate this class"
  • @Inject field - "Dagger, please set this field for me"
  • AndroidInjection.inject(this) - "Dagger, please inject this class's fields now"
  • @Singleton in a @Module - "Dagger, please only create one instance of this dependency" (be sure you know what your're doing when using this)