2
votes

Scenario:

After selecting the "Go To Detail" button, I would like to navigate to a new page without the bottom tab navigator.

Problem:

However, the bottom tab navigator is still there.

Problem

Possible solution:

Push the "DetailView" via the root view instead of "HomeView" stack. But how to do it?

Expo project link

Updated

Changed the Drawer Navigator to include DetailNavigator, however the transition is rather abrupt and it's added to drawer which is unwanted behavior:

const DrawerNavigator = createDrawerNavigator({ Home: BottomTabNavigator, Settings: SettingsNavigator, Detail: DetailNavigator });

export const DetailNavigator = createStackNavigator({ Detail: { screen: DetailScreen } });

After changing (DetailView appear abruptly):

After

Before changing (DetailView appear smoothly with animation):

enter image description here

1

1 Answers

1
votes

you probably want to hide tab bar on specific screens without changing your navigators structure, take a look here https://reactnavigation.org/docs/en/navigation-options-resolution.html#a-tab-navigator-contains-a-stack-and-you-want-to-hide-the-tab-bar-on-specific-screens