Skip to content

Instantly share code, notes, and snippets.

@ValeryPonomarenko
Created September 14, 2018 15:13
Show Gist options
  • Save ValeryPonomarenko/b5c0f9f8f25e48ef03d2a5c0693569d2 to your computer and use it in GitHub Desktop.
Save ValeryPonomarenko/b5c0f9f8f25e48ef03d2a5c0693569d2 to your computer and use it in GitHub Desktop.
Lifecycle aware dagger components
class AnotherFragment : Fragment(), IHasComponent {
//code...
override fun getComponent(): AnotherFeatureComponent =
DaggerAnotherFeatureComponent.builder()
.appDependency(InjectionManager.instance.findComponent())
.build()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment