Skip to content

Commit

Permalink
Merge branch '4.0.1' into 4.1.0
Browse files Browse the repository at this point in the history
# Conflicts:
#	projects/gradle/libs.versions.toml
  • Loading branch information
arnaudgiuliani committed Nov 15, 2024
2 parents 3a21d0b + 0c93bd6 commit f63c350
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 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 @@ -77,7 +77,7 @@ startKoin {
By using Gradle packge `koin-androidx-startup`, we can use `KoinStartup` interface to declare your Koin configuration your Application class:

```kotlin
class MainApplication : Application() {
class MainApplication : Application(),KoinStartup {

override fun onKoinStartup(): KoinAppDeclaration = {
androidContext(this@MainApplication)
Expand All @@ -93,7 +93,7 @@ class MainApplication : Application() {
This replaces the `startKoin` function that is usally used in `onCreate`.

:::info
Gain over from `KoinStartup` to regular `startKoin` can go over 30% of time gained, for startup time.
`KoinStartup` avoid blocking main thread at for startup time, and offers better performances.
:::

## Startup Dependency with Koin
Expand Down
9 changes: 3 additions & 6 deletions docs/reference/koin-compose/compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@ for an Android/Multiplatform app, use the following packages:
The function `KoinApplication` helps to create Koin application instance, as a Composable:

```kotlin
fun koinConfiguration() = koinApplication {
// your configuration & modules here
modules(...)
}

@Composable
fun App() {
KoinApplication(::koinConfiguration) {
KoinApplication(application = {
modules(...)
}) {

// your screens here ...
MyScreen()
Expand Down

0 comments on commit f63c350

Please sign in to comment.