Vlad
04/08/2025, 3:10 PMfun 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:
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?Vlad
04/09/2025, 3:06 PMModule 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