I’ve got a question on compose navigation. I know that navigation is supposed to be event based, user presses X button to go to Y screen, etc...
This is all well and good until I got to implementing more complex state with login status, whether they've onboarded, etc...
My first approach was to separate the main flows of the app into separate NavGraphs and then dynamically set the start destination of the navigation host based on state. So if the state showed the user was unauthenticated then the LoginGraph is set as the start destination, if they are authenticated but not finished onboarding then they get the OnboardingGraph.
This appeared to be working but what I hadn't realized is that when the app was first initialized the navigation host would touch at least two or three graphs before the state was fully hydrated.
I'm wondering how I would handle the scenario of needing to place the user on the right path based on some state without actually making the navgation based on state instead of events.