|
|
|
|
|
by clumsysmurf
2984 days ago
|
|
> No one understands scopes and subscopes, subcomponents etc I think there are two reasons for this. First, is how scopes interact with Android component lifecycles, which make everything harder (like RxJava, etc) since they are a complexity multiplier. Second, there are seemingly bizarre design decisions. For example, if you use dependent components (aka component dependencies), the syntax is pretty straightforward: @Component { }
interface AppComponent { X,Y,Z }
@Component { dependencies = AppComponent.class }
interface LoginComponent { }
So the natural order of things is, components use modules, and components can depend on other components. Pretty simple.Subcomponents turns this relatively simple schema around. The documentation for subcomponents say: > "To add a subcomponent to a parent component, add the subcomponent class to the subcomponents attribute of a @Module that the parent component installs." I find is truly strange, now we have modules depending on (sub)components which is the inverse relationship as above. |
|