Hey guys. I have `fun viewModelsModule() = module ...
# koin
v
Hey guys. I have
fun viewModelsModule() = module {}
which lists all the ViewModels of all the features in the app. Now I am thinking that it would make sense to split module declaration per feature:
Copy code
fun categoriesModule() = module {
    factoryOf(::CategoriesViewModel)
    // Maybe something else
}
and then include all the feature modules somewhere. The main question is that this will introduce tens to hundred additional koin modules (instead of 1) - would it considered bad practice or will affect koin performance in negative way?
Copy code
Module loading is now optimized to flatten all your module graphs and avoid duplicated definitions of modules.
I guess this answer the question and koin doesn't really care how I declared the definitions since it will flatten them anyway