Skip to content

Commit

Permalink
Fix doc for koinApplication @ Android start
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgiuliani committed Jan 13, 2025
1 parent a4abf5f commit 73e5c6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/reference/koin-android/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ By using Gradle packge `koin-androidx-startup`, we can use `KoinStartup` interfa
```kotlin
class MainApplication : Application(),KoinStartup {

override fun onKoinStartup(): KoinAppDeclaration = {
override fun onKoinStartup()= koinConfiguration {
androidContext(this@MainApplication)
modules(appModule)
}
Expand All @@ -90,7 +90,7 @@ class MainApplication : Application(),KoinStartup {
}
```

This replaces the `startKoin` function that is usally used in `onCreate`.
This replaces the `startKoin` function that is usally used in `onCreate`. The `koinConfiguration` function is returning a `KoinConfiguration` instance.

:::info
`KoinStartup` avoid blocking main thread at for startup time, and offers better performances.
Expand Down

0 comments on commit 73e5c6b

Please sign in to comment.