The same Screen should be accessible from multiple Navigators and configurable to share one route #11199
mitchellkager
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My app's root is a tab navigator. Most tabs have a stack that enable the user to perform navigation within the tab to click through profiles and posts.
This is a very familiar functionality seen in Instagram, for example.
From what I have read online, the best way to support identical stack Screens in multiple tabs is just to declare redundant screens. Fine: I set up a helper component that accepts a Navigator within which to return these "shared components".
But, I see no resolution for linking. Each tab's stack's shared components will have distinct paths that create a weird experience for users to copy and share links to profiles and posts. If I open a link to a profile, it should open in my home feed tab even if the link was copied while navigating within the search tab, for example.
I could see this being configured through passing some option to these shared screens:
absoluteLinkingPath
or something of a similar denotation which would allow screens to be assigned an absolute path that did not inherit from its parent's route and, crucially, could even be redundant with screens in other navigators.Of course, some default routing configuration would also be required soas to specify which tab these shared components should be opened within by default.
Beta Was this translation helpful? Give feedback.
All reactions