Is this a good practice for Application object to ...
# android
a
Is this a good practice for Application object to implement the root component (AppComponent)?
Copy code
lass App : Application(), AppComponent {

  lateinit var appComponent: AppComponent

  override fun onCreate() {
    super.onCreate()

    appComponent = DaggerAppComponent.builder().build()
  }

  override fun activityComponent(module: ActivityModule) = appComponent.activityComponent(module)
}