In Dagger
I sometimes see that there are components that just extend an interface while others use the dependencies
.
So for example we have a base component:
@Singleton
@Component(modules={...})
public interface BaseComponent {
...
}
Version 1:
@Singleton
@Component(modules={...})
public interface MyComponent extends BaseComponent {
...
}
And Version 2:
@CustomScope
@Component(modules={...}, dependencies= BaseComponent.class)
public interface MyComponent {
...
}
Are they used for different scenarios?