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
Draft
Conversation
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. |
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.
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 inreact-native-screens.Backward compatibility
By using
backButtonUseModernImplementationflag, we maintain backward compatibility. If outdated version ofreact-navigationorreact-native-screenswill be used, previous implementation will be used. PassingbackButtonDisplayModedirectly in all cases will not break previous implementation. For more details, seeCompatibility with previous versionssection in PR fromreact-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).