How to do a React-Navigation Route? (Tabs)

I created an application with React native expo. I chose the React-Navigation tabs feature. When I created a new screen, it appears in the Tab section. I dont want this. I just want him to go to that page when he clicks on the link. But it's added to the Tab section.

const tabNavigator = createBottomTabNavigator({
  HomeStack,
  CampaignStack,
  MenuStack
});

tabNavigator.path = '';

export default tabNavigator;

I will be redirected from the menu screen to the login screen. But I don't want it in the Tabs section.

I'd appreciate it if you helped to solve my problem.

Upvotes: 0

Views: 628

Answers (1)

Esso
Esso

Reputation: 86

you need to create a stackNavigator for that.

const AppStack = createStackNavigator({ FirstPage: HomeScreen, SecondPage: SecondScreen });

and when creating that, from the first page, you can use for the action Navigation.navigate(YOUR_PAGE_ID);

Please refer to react-navigation docs for more info

Upvotes: 2

Related Questions