Skip to content

Instantly share code, notes, and snippets.

@burnoo
Last active October 13, 2021 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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