InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
8.98k stars 710 forks source link

Add new KoinApplication Composable #1701

Closed Bloemcol closed 10 months ago

Bloemcol commented 10 months ago

Context

After using the KoinApplication Composable in a different project, it felt weird to me that you need a lambda to provide the modules to your Koin application.

This new Composable only requires a list of modules to work, making it just a bit easier to use.

Bonus change

Removed unused import from sample app.

Note

⚠️ Warning: light mode screenshots ahead!

I did not use hyphens in the JavaDoc comment, as the docs are easier on the eye without them. Compare the JavaDoc hover preview in Android Studio of the KoinApplication Composable mentioned above

Screenshot 2023-11-11 at 09 03 20

with the new one.

Screenshot 2023-11-11 at 09 03 34
Bloemcol commented 10 months ago

Please see #1704 for a PR with verified commits.