Skip to content

fix: update back button configuration logic to match new logic in react-native-screens#12795

Draft
kligarski wants to merge 2 commits intoreact-navigation:7.xfrom
kligarski:@kligarski/simplify-ios-back-button-logic
Draft

fix: update back button configuration logic to match new logic in react-native-screens#12795
kligarski wants to merge 2 commits intoreact-navigation:7.xfrom
kligarski:@kligarski/simplify-ios-back-button-logic

Conversation

@kligarski
Copy link
Copy Markdown
Contributor

@kligarski kligarski commented Oct 16, 2025

Motivation

Due to changes in native back button behavior starting from iOS 26, logic handling configuration of back button item needed to change in react-native-screens. We managed to handle more cases correctly and simplify the API. For more details, please see the PR in react-native-screens.

Backward compatibility

By using backButtonUseModernImplementation flag, we maintain backward compatibility. If outdated version of react-navigation or react-native-screens will be used, previous implementation will be used. Passing backButtonDisplayMode directly in all cases will not break previous implementation. For more details, see Compatibility with previous versions section in PR from react-native-screens.

Test plan

Back button should follow configuration table posted in the PR in react-native-screens. With default configuration on iOS 26, back button should only display the chevron (without any text).

@satya164
Copy link
Copy Markdown
Member

This would be a breaking change in React Navigation 7 if it needs a newer version of screens to work. We can do this for React Navigation 8, but we will need to figure out how to keep compatibility in v7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants