Skip to content

Commit

Permalink
Merge pull request #2047 from pagsantos/patch-1
Browse files Browse the repository at this point in the history
Update context-isolation.md
  • Loading branch information
arnaudgiuliani authored Nov 15, 2024
2 parents 84d8a67 + 89a83f5 commit 6e243f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/reference/koin-core/context-isolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The `MyIsolatedKoinContext` class is holding our Koin instance here:
// Get a Context for your Koin instance
object MyIsolatedKoinContext {

val koinApp = koinApplication {
private val koinApp = koinApplication {
// declare used modules
modules(coffeeAppModule)
}
Expand All @@ -40,7 +40,7 @@ object MyIsolatedKoinContext {
Let's use `MyIsolatedKoinContext` to define our `IsolatedKoinComponent` class, a KoinComponent that will use our isolated context:

```kotlin
abstract class IsolatedKoinComponent : KoinComponent {
internal interface IsolatedKoinComponent : KoinComponent {

// Override default Koin instance
override fun getKoin(): Koin = MyIsolatedKoinContext.koin
Expand All @@ -50,7 +50,7 @@ abstract class IsolatedKoinComponent : KoinComponent {
Everything is ready, just use `IsolatedKoinComponent` to retrieve instances from isolated context:

```kotlin
class MyKoinComponent : IsolatedKoinComponent(){
class MyKoinComponent : IsolatedKoinComponent {
// inject & get will target MyKoinContext
}
```
Expand Down

0 comments on commit 6e243f4

Please sign in to comment.