Tlaster / PreCompose

Compose Multiplatform Navigation && State Management
https://tlaster.github.io/PreCompose/
MIT License
803 stars 48 forks source link

No Koin context has been provided #185

Closed alorma closed 7 months ago

alorma commented 7 months ago

I'm receiving this error when trying to use the precompose-koin library.

Process: com.alorma.gasstations, PID: 21971
                 org.koin.compose.error.UnknownKoinContext: No Koin context has been provided
                    at org.koin.compose.KoinApplicationKt$LocalKoinScope$1.invoke(KoinApplication.kt:49)
                    at org.koin.compose.KoinApplicationKt$LocalKoinScope$1.invoke(KoinApplication.kt:48)

I initialize koin on the activity (or application, don't change the error) but trying to obtain the VM shows that error.

alorma commented 7 months ago

Solved, using KoinContext as root of all composables.