Hello again, is there a sample or documentation wh...
# decompose
a
Hello again, is there a sample or documentation which tells how to switch between two different stacks e.g.
onboarding
and
auth
? I have created two different navigations and configs
Copy code
private val landingNavigation = StackNavigation<LandingConfig>()
private val authNavigation = StackNavigation<AuthConfig>()
What I would like to achieve is: When a screen of onboarding invokes login, I will push authNavigation's first screen and auth flow should start. There will be no backstack. What is the correct way to handle it? I got hint of Child Stack but don't know about usage. Any direction would be appreciated.
a
I think you can extract your Landing flow into a separate LandingComponent, and your auth flow into a separate AuthComponent. Each with its own stack. Then the parent component may have its own navigation (e.g. also stack) and switch between the two flows. You can also add a third component to that parent stack - SignedInComponent that manages the graph when the user is signed in.
a
I think I understood the concept you are explaining and it makes sense. I think it's similar to how react native handles routing. I'll try. Thank you
👍 1