Skip to content

Instantly share code, notes, and snippets.

@burnoo
Last active October 13, 2021 12:17
Show Gist options
  • Save burnoo/07db5d86215d2476e39896bb8285cfa9 to your computer and use it in GitHub Desktop.
Save burnoo/07db5d86215d2476e39896bb8285cfa9 to your computer and use it in GitHub Desktop.
Cokoin Medium 2
val appModule = module {
single { AppData() }
}
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
Koin(appDeclaration = { modules(appModule) }) {
val appData = get<AppData>()
App(appData)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment