How to change the back button label, react-navigation
You can use headerBackTitle
prop to control back button title.
headerBackTitle
Title string used by the back button on iOS, or null to disable label. Defaults to the previous scene's
headerTitle
Example
const SomeNavigator = StackNavigator({
Main: { screen: Main },
Login: {
screen: Login,
navigationOptions: {
headerBackTitle: 'some label'
}
}
});
UPDATE as of version 5
As of version 5, it is the option headerBackTitleVisible
in screenOptions
Example of usage:
<Stack.Navigator
screenOptions={{
headerBackTitleVisible: false
}}
>
<Stack.Screen name="route-name" component={ScreenComponent} />
</Stack.Navigator>
if you want only to hide in the single screen you can do this by setting the screenOptions
on the screen component see below for example:
<Stack.Screen options={{headerBackTitleVisible: false}} name="route-name" component={ScreenComponent} />