Currently the TabRouter will switch to a child router that handles a navigation action if it is not SET_PARAMS or (soon) COMPLETE_TRANSITION. We should have some flag on navigation actions that either a) tells the router to switch focus to the child that handles the action or b) tells the router to not switch focus if the child handles the action. This lets people with custom routers and actions deal with the behavior properly without forking TabNavigator to add their action to the whitelist.
Closing since we have added a flag on action (action.preserveFocus). In React Navigation 5, routers can specify a shouldActionChangeFocus method to control this behaviour.
Currently the TabRouter will switch to a child router that handles a navigation action if it is not
SET_PARAMS
or (soon)COMPLETE_TRANSITION
. We should have some flag on navigation actions that either a) tells the router to switch focus to the child that handles the action or b) tells the router to not switch focus if the child handles the action. This lets people with custom routers and actions deal with the behavior properly without forking TabNavigator to add their action to the whitelist.