Does anyone know how to pass arguments to the start destination of a nested graph?
i
Ian Lake
03/12/2021, 7:41 PM
Well there's two things to keep in mind:
⢠Any arguments you pass to the graph itself will automatically be sent to the start destination of the graph
⢠You can navigate() with the route of any destination, so you can navigate directly to the start destination with whatever arguments you want
I think we missed add the arguments/deeplinks arguments on the
Any arguments you pass to the graph itself will automatically be sent to the start destination of the graph
does this means we have to declare the args on both the graph and the destination, or just one of them?
i
Ian Lake
03/13/2021, 4:54 AM
Only on the one that has those arguments in it's route. In Navigation Compose, navigating directly to the destination you want is generally going to centralize the definition of arguments and where you use them better, so the later solution is going to be the better choice almost every time