What is the best practice in handling koin modules...
# koin
d
What is the best practice in handling koin modules in multimodule project? I ‘ve come up with solution that each module will provide list od modules that he wants to load to the whole graph and in the top level App module I will gather all of these and put them inside loadKoinModules function but maybe there is something better?
interesting .. I have a small problem with calling
injectFeature
in a screen. It seems wrong but I dont know where else to put it
s
What problem?
d
That I bloat my Fragment, which should know anything about how stuff are injected there, with some injectFeature logic. Something like static initializer from java would be suitable for feature load but unofrtunately there is nothing like that in Kotlin
s
in your fragment you just call inject feature