Update docs after changes to headerBackTitle#1422
Merged
Conversation
✅ Deploy Preview for react-navigation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
kkafar
reviewed
Apr 11, 2025
Contributor
kkafar
left a comment
There was a problem hiding this comment.
This looks fine, since web is not mentioned here (?? 😄)
But let's wait with landing these until we land
maciekstosio
added a commit
to react-navigation/react-navigation
that referenced
this pull request
Apr 11, 2025
**Motivation** The iOS has a default behavior how to deal with back title label - it changes its size depending on available space. It didn't work for custom back title, as react-native-screens used custom back button item when custom back title was provided. This changes in software-mansion/react-native-screens#2860, thus we can remove check on react-navigation side. Corresponding docs update: react-navigation/react-navigation.github.io#1422 **Test plan** See `Test code and steps to reproduce` in software-mansion/react-native-screens#2860 or test this snippet (very long custom back button title should be changed to `Back`): <details> <summary>Source code</summary> ``` import * as React from 'react'; import { Button, Text, View } from 'react-native'; import { ParamListBase } from '@react-navigation/native'; import { createNativeStackNavigator, NativeStackNavigationProp, } from '@react-navigation/native-stack'; export function FinalScreen({ navigation, }: { navigation: NativeStackNavigationProp<ParamListBase>; }) { return ( <View style={{ flex: 1, backgroundColor: 'yellow', justifyContent: 'center', alignItems: 'center' }}> <Text>VOID</Text> <Button title="Pop to top" onPress={() => navigation.popTo('Home')} /> </View> ); } export function Home({ navigation, }: { navigation: NativeStackNavigationProp<ParamListBase>; }) { return ( <View style={{ flex: 1, backgroundColor: 'yellow' }}> <Button title="Open screen" onPress={() => navigation.navigate('Second')} /> </View> ); } export default () =>{ const Stack = createNativeStackNavigator(); return ( <Stack.Navigator> <Stack.Screen name="First" component={Home} /> <Stack.Screen name="Second" component={FinalScreen} options={{headerBackTitle: 'LongLongLongLongLong'}} /> </Stack.Navigator> ); }; ``` </details>⚠️ Keep in mind that it requires changes from screens to work --------- Co-authored-by: Kacper Kafara <kacperkafara@gmail.com>
satya164
approved these changes
Apr 17, 2025
satya164
pushed a commit
to shubh73/react-navigation.github.io
that referenced
this pull request
Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs changes to: react-navigation/react-navigation#12543