I have a question with kotlin-inject. When I mark ...
# kotlin-inject
a
I have a question with kotlin-inject. When I mark a class @Inject, how do I then instantiate that class with kotlin-inject figuring out the arguments to that class?
f
you instantiate objects through a
@Component
— you have to expose the object you want in the component, create the component, and make the call, just like vanilla Dagger
Copy code
@Inject
class MyObject

@Component
abstract class MyComponent {
  val myObject: MyObject
}

val myObject = MyComponent::class.create().myObject
1