vaibhav gadekar
vaibhav gadekar

Reputation: 190

How to open new Screen in React Native

In my react native project I have BottomTabNavigation with 5 bottom tabs but i want to add new screens not a tab (like login,signup, change password ,cart,sign out ) but i dont know 😢 how to do this , can anyone tell me how this will happen. Thanks in Advance.

Here is my app screenshot https://ibb.co/4fqgXwp

Upvotes: 0

Views: 1185

Answers (3)

Mehran Khan
Mehran Khan

Reputation: 3636

You should use Stack Navigator as your main navigator . Add Bottom Tab navigator as stack navigator scene

Code For AppNavigator React Navigation

const TabNavigator = createBottomTabNavigator({
  Tab1: Tab1,
  Tab2: Tab2,
  Tab3: Tab3,
  Tab4: Tab4,
  Tab5: Tab5
});

const AppNavigator = createStackNavigator({
  Home: TabNavigator,
  Login: Login
});

export default createAppContainer(AppNavigator);

Working Demo

enter image description here

Upvotes: 1

turnrye
turnrye

Reputation: 36

React Native doesn't provide a navigation solution as robust as you're asking for. Take a look at react-navigation for a solution that should be easy to follow and meet your needs.

Upvotes: 1

Gokul Nath KP
Gokul Nath KP

Reputation: 15553

You can use react-native-navigation library as mentioned in official documentation.

Upvotes: 0

Related Questions