hey folks, general question i would like to see ho...
# compose
o
hey folks, general question i would like to see how others do it with feature modules
featureA:presentation
,
featureB:presentation
if featureA wants to launch a screen in featureB, how do you do it? would you add a dependency of
featureB
in
featureA
and do
navcontroller.navigate(featureBDestination.Screen)
? just wondering what is the consensus of dependencies between presentation modules we have one graph that contains all destinations (cant have multiple graphs atm), and each module defines its destinations inside
s
https://developer.android.com/guide/navigation/integrations/multi-module Your feature modules should optimally just see a
navigateToX: () -> Unit
lambda, without having to know anything about that module at all. Then your app module who knows about all destinations can provide the correct lambda implementation. We do this all over in this file https://github.com/HedvigInsurance/android/blob/develop/app%2Fapp%2Fsrc%2Fmain%2Fkotlin%2Fcom%2Fhedvig%2Fandroid%2Fapp%2Fnavigation%2FHedvigNavHost.kt#L178-L180
o
awesome that answers it, thanks you!
🌟 1