Closed gecko10000 closed 8 months ago
Thanks for your feedback 👍
@gecko10000 try wrapping the composable with KoinContext { ... }
That fixes it, but it would be helpful to mention in the documentation, probably around here. I assumed androidContext(this@MainActivity)
would be enough in the startKoin
block (since it mostly worked).
Cool. I'll update the documentation 👍
Doc added 👍
Describe the bug When using
koinInject()
in a Composable, rotating the device causes a ClosedScopeException and crashes the application.To Reproduce Run this minimal reproducible example and rotate the device.
Expected behavior The rotation should succeed and the application should continue running.
Koin module and version:
koin-android:3.5.3
koin-androidx-compose:3.5.3