Skip to content

Instantly share code, notes, and snippets.

@pedromassango
Last active October 3, 2018 10:23
Show Gist options
  • Select an option

  • Save pedromassango/a9a8188dd3c5ead97f20b55d2a9267d4 to your computer and use it in GitHub Desktop.

Select an option

Save pedromassango/a9a8188dd3c5ead97f20b55d2a9267d4 to your computer and use it in GitHub Desktop.
object DependeciesModule {
val appModule = module {
// Usinlge only one instance of the giving class will run at time
single { Repository() }
// Koin will take care of creating ViewModel's dependencies
viewModel { MainViewModel( get()) }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment