Skip to content

Instantly share code, notes, and snippets.

@naltynbekkz
Created April 25, 2020 18:21
Show Gist options
  • Save naltynbekkz/855025aaee6624889ec294c2025e68ac to your computer and use it in GitHub Desktop.
Save naltynbekkz/855025aaee6624889ec294c2025e68ac to your computer and use it in GitHub Desktop.
@BlogsScope
@Subcomponent(modules = [BlogsViewModelsModule::class])
interface BlogsComponent {
@Subcomponent.Factory
interface Factory {
fun create(): BlogsComponent
}
fun inject(fragment: BlogsFragment)
fun inject(fragment: BlogFragment)
}
@SecondScope
@Subcomponent(modules = [SecondViewModelsModule::class])
interface SecondComponent {
@Subcomponent.Factory
interface Factory {
fun create(): SecondComponent
}
fun inject(fragment: SecondFragment)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment