koin icon indicating copy to clipboard operation
koin copied to clipboard

Documentation Bug: "Application" Should Be "Activity"

Open commonsguy opened this issue 1 year ago • 0 comments

Describe the bug The wrong class is used in a code snippet in the documentation.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://insert-koin.io/docs/setup/why#ready-for-android
  2. Read the second code snippet, notice that the class is named MyActivity and that injected object is a "presenter"

Expected behavior MyActivity to extend Activity, not Application. IOW, it should be:

class MyActivity : Activity() {

  val myPresenter : MyPresenter by inject()

} 

(if you would prefer ComponentActivity or AppCompatActivity, that's cool too)

Koin module and version: The current version of Koin is 4.0.0-RC1

Thanks for considering this!

commonsguy avatar Jul 26 '24 17:07 commonsguy