How can I handle this case? ```@Single class Item...
# koin
p
How can I handle this case?
Copy code
@Single
class Item1(
    @InjectedParam private val xpto: MyClass, <<<<
)

@Single
class MyComponent(
    @InjectedParam private val xpto: MyClass, <<<<
    private val item1: Item1
)
https://insert-koin.io/docs/reference/koin-annotations/definitions#injected-parameters-with-injectedparam
a
You mean chaining injections?
p
Yeah... but I think this is not making sense... The idea it will replace/reuse the same injection (equal to both classes). I avoid it right now moving to a function and invoking the dependency inside this function.
Other question, how can I do this in constructor level?
Something like:
Copy code
@Factory
internal class Repository(
    @Named("mock-remote") private val mock: Mock
): RemoteDataSource