Hi, I was wondering how to properly scope dependen...
# koin
a
Hi, I was wondering how to properly scope dependencies. Let say I have
SomeDependency()
scoped to the lifecycle of the activity like so:
Copy code
val someActivityModule = module {

    scope<SomeActivity> {
        scoped<SomeDependency> {
            SomeDependencyImpl()
        }
    }
}
and then I have a fragment which needs that
SomeDependency()
like so:
Copy code
val someFragmentModule = module {
    fragment {
        SomeFragment(someDependency = get())
    }
}
I was wondering how I would be able to get the depency correctly? Can anyone guide me? Thank you very much.
y
Have you found a solution?
h
I'm not a super expert of scope but I remember that you have to retrive the scope first and get the dependencies from it