Posts

Showing posts with the label react-navigation

Nested TabNavigator inside StackNavigator: controlling the header

Nested TabNavigator inside StackNavigator: controlling the header I have a setup much like this: let Tabs = createBottomTabNavigator({ screen1: Screen1, screen2: Screen2 }) let Stack = createStackNavigator({ tabs: Tabs otherScreen: OtherScreen }) The stack navigator has a header, and that's fine. What I want is to get different header icons depending on what tab I'm currently on. I'm using the following versions: "react": "16.3.1", "react-native": "~0.55.2", "react-navigation": "^2.2.5" I've considered switching up my setup so that each tab screen has its own StackNavigator but I like having the sliding animation when switching tabs and I don't want the header icons to slide along. The header bar should remain static but simply show different icons depending on the current tab. StackNavigator This question has not received enough attention. 4 Answers ...