Hello. I need some explanation on "how to do hiera...
# koin
v
Hello. I need some explanation on "how to do hierarchy" in koin e.g. I need differently created retrofit instances for different activities. I can do it by calling startKoin with all modules needed at each activity, that's seems to be ok but I have, for example, a DB manager, that must be application-scoped. by calling startKoin each time i need to provide new instance of DBModule and that's seems not to be OK, 'cause of new instances are about to create in new context. using dagger I could have activity component is somehow related to the main component. how could I achieve the same using koin? btw, still I love this library so far, ty ❤️
☝️ 1
a
Hi @Va Fu `startKoin`must be called just once - in your Application class.
if you provide components directly, it will be in application scope
you can open `context`secvtions to describe sub contexts that you can drop
v
ok, to the test project 😄
a
check the sample project if you want
v
here I have a simple wrapper that provides Conductor's router instance for each activity
holly molly, I cannot post photos to thread, sorry