1 year ago
#315873
afshana zaman
backBehavior is not working in react native for current version
react native BackBehavior ="history" or "order" is not working in react native bottom tab for current version what can i do to fix this..suppose from stories if i go to some other page then in their back navigation it should go back to stories tab but i goes to the home tab
<Tab.Navigator navigation={this.props.navigation} backBehavior= "order" >
<Tab.Screen
name="home"
component={MainStackNavigator}
options={{
tabBarIcon: ({ focused }) => (
<View>
<LinearGradient start={{x:0,y: 0}} end= {{x:1,y:0}}>
<Image
source={require("../../assets/images/home.png")}
resizeMode="contain"/>
</LinearGradient>
<Text>
Home
</Text>
</View>
),
}}
/>
<Tab.Screen
name="Stories"
component={Stories}
options={{
tabBarIcon: ({ focused }) => (
<View>
<LinearGradient start={{x:0,y: 0}} end= {{x:1,y:0}} >
<Image
source={require("../../assets/images/book.png")}/>
</LinearGradient>
<Text
style={{
color: focused ? "#202877" : "#748c94",
fontSize: 12,
}}
>
Stories
</Text>
</View>
),
}}
/>
</Tab.Navigator>
react-native
react-navigation-bottom-tab
0 Answers
Your Answer