Class
EmptyComponent
A component for root napkins that have no parent dependencies.
class EmptyComponent
Overview
EmptyComponent is the canonical “no upstream dependency” terminator. Use it as the parent dependency of an application’s root component when the root has nothing to inherit:
final class AppComponent: Component<EmptyDependency>, RootDependency {
init() {
super.init(dependency: EmptyComponent())
}
var userService: UserService {
shared { UserService() }
}
}
See Also
EmptyDependency
See Also
Component
Topics
Initializers
Relationships
Conforms To