Add multiple routes to navigation stack #932
andreweinhorn
started this conversation in
General
Replies: 1 comment
-
Looking for insight into this as well! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to know if there is a way to push multiple routes in the navigation stack.
Use Case
I am using universal links to take my user to tabs/explore/screen. On this screen, there is a back button that uses router.back(). And normally it would take the user back to tabs/explore. However, with a universal link, the user might previously have been in tabs/profile when last using the app. So now the back button on tabs/explore/screen will take them to tabs/profile. Which is not desirable.
Previously with react navigation we could do something like this when handling a universal link:
That is to say, we could reset the router and push multiple routes onto it, ensuring that the router.back() in tabs/explore/stack will take us to tabs/explore.
Does this functionality exist in expo-router?
Really appreciate all the work you guys have done on this package, hope my question makes sense.
Beta Was this translation helpful? Give feedback.
All reactions