Or it does not have to be a graph? It can also be ...
# compose-destinations
s
Or it does not have to be a graph? It can also be implemented as two routes in two graphs wrapping the same composable component. What's the best practice when some screens need to be shown in multiple graphs?
r
On V2, you can have something like this:
Copy code
@Destination<ProfileSettingsGraph>
@Destination<RootGraph>
@Composable
fun SomeScreen() {}
👍 1
for example
It would generate two Destinations, like
ProfileSettingsSomeScreenDestination
and
RootSomeScreenDestination
each belonging to the corresponding graph
On V1, you'd need two Composables each annotated with @Destination and with the respective @NavGraph and then both would call the same composable internally.