C
C
Ceretean2019-04-03 13:59:59
React
Ceretean, 2019-04-03 13:59:59

How to make StackNavigator and BottomTabNavigator on the same level?

There is an application in which there are 10+ pages, for them you need to make StackNavigation and at the same time BottomTabNavigation should be displayed at the bottom in which there are only 3 pages from StackNavigation, how best to implement this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Panteleev, 2019-04-03
@Ceretean

At one level - no way, you can put StackNavigationin BottomTabNavigationand already register transitions there.

For example like this
const AppNavigator = createBottomTabNavigator({
  RootScreenA: {
    screen: createStackNavigator({
      ChildScreenA: {
        screen: ChildScreenA,
      },
      ChildScreenB: {
        screen: ChildScreenA,
      },
    }),
  },
  RootScreenB: {
    screen: createStackNavigator({
      ChildScreenA: {
        screen: ChildScreenA,
      },
      ChildScreenC: {
        screen: ChildScreenC,
      },
    }),
  },
  RootScreenC: {
    screen: createStackNavigator({
      ChildScreenD: {
        screen: ChildScreenD,
      },
      ChildScreenE: {
        screen: ChildScreenE,
      },
    }),
  },
});
const App = createAppContainer(AppNavigator);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question