The Docs for React navigation say:
“Since each tab is its own navigation stack, it is important to note that these navigation stacks should never interact. This means that there should never be a button in Tab 1 that routes a user to Tab 2. In other words, tabs should only be changed by the user tapping a tab button in the tab bar.” React Navigation: Router Link Redirect to Navigate to Another Page
But my app has a FAB that has shortcuts to various parts of the app (usually with query param state pre-filled). (pressing the FAB opens various smaller icon buttons that when pressed route the user to a specific page with state provided in query params). I also have notifications that provide a deep link to a specific page (with query param state). My questions are:
-
Does this violate the rule stated above? If a user is on tab-A and they click on the FAB shortcut to go to tab-B?param1=123¶m2=abc, does that count as changing tabs without tapping on a tab button in the tab bar?
-
If so, what is the worst that could happen? Will something actually break or is it just a matter of not meeting the expectations of how navigation works on mobile?
-
Does this mean deep linking is never allowed since it might route the user to a different tab than they are on when they use the deep link?
1 post - 1 participant