refactor!: disable child navigators handling actions by default#10905
Merged
refactor!: disable child navigators handling actions by default#10905
Conversation
|
The Expo app for the example from this branch is ready! expo.dev/@react-navigation/react-navigation-example?release-channel=pr-10905 |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 7.x #10905 +/- ##
======================================
Coverage ? 75.27%
======================================
Files ? 168
Lines ? 5173
Branches ? 2005
======================================
Hits ? 3894
Misses ? 1239
Partials ? 40 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
cdc8f11 to
6fa3de4
Compare
kacperkapusciak
approved these changes
Oct 10, 2022
) This drops the `independent` prop from the container in favor of a component. In case of cases such as mini-apps, this allows the parent app to disconnect the child navigation tree from itself. Another reason is that a lot of newbies added `independent` prop to avoid error and got confused when nested navigation didn't work. By moving it into a component and making it harder to do it accidentally, maybe this can be avoided.
satya164
added a commit
that referenced
this pull request
Oct 11, 2022
Due to backward compatibility reasons, React Navigation 5 and 6 support navigating to a screen in a child navigator with `navigation.navigate(ScreenName)` syntax. But this is problematic with the new architecture - it only works if the navigator is already mounted, doesn't work with TypeScript, etc. That's why there's a special API to navigate to a nested screen (`navigation.navigate(ParentScreenName, { screen: ScreenName })`).
This drops this behavior and adds a prop to explicitly enable it to make it easier to migrate. This prop will be removed in the next major.
satya164
added a commit
that referenced
this pull request
Oct 11, 2022
Due to backward compatibility reasons, React Navigation 5 and 6 support navigating to a screen in a child navigator with `navigation.navigate(ScreenName)` syntax. But this is problematic with the new architecture - it only works if the navigator is already mounted, doesn't work with TypeScript, etc. That's why there's a special API to navigate to a nested screen (`navigation.navigate(ParentScreenName, { screen: ScreenName })`).
This drops this behavior and adds a prop to explicitly enable it to make it easier to migrate. This prop will be removed in the next major.
satya164
added a commit
that referenced
this pull request
Nov 16, 2022
Due to backward compatibility reasons, React Navigation 5 and 6 support navigating to a screen in a child navigator with `navigation.navigate(ScreenName)` syntax. But this is problematic with the new architecture - it only works if the navigator is already mounted, doesn't work with TypeScript, etc. That's why there's a special API to navigate to a nested screen (`navigation.navigate(ParentScreenName, { screen: ScreenName })`).
This drops this behavior and adds a prop to explicitly enable it to make it easier to migrate. This prop will be removed in the next major.
satya164
added a commit
that referenced
this pull request
Nov 16, 2022
Due to backward compatibility reasons, React Navigation 5 and 6 support navigating to a screen in a child navigator with `navigation.navigate(ScreenName)` syntax. But this is problematic with the new architecture - it only works if the navigator is already mounted, doesn't work with TypeScript, etc. That's why there's a special API to navigate to a nested screen (`navigation.navigate(ParentScreenName, { screen: ScreenName })`).
This drops this behavior and adds a prop to explicitly enable it to make it easier to migrate. This prop will be removed in the next major.
satya164
added a commit
that referenced
this pull request
Nov 16, 2022
Due to backward compatibility reasons, React Navigation 5 and 6 support navigating to a screen in a child navigator with `navigation.navigate(ScreenName)` syntax. But this is problematic with the new architecture - it only works if the navigator is already mounted, doesn't work with TypeScript, etc. That's why there's a special API to navigate to a nested screen (`navigation.navigate(ParentScreenName, { screen: ScreenName })`).
This drops this behavior and adds a prop to explicitly enable it to make it easier to migrate. This prop will be removed in the next major.
satya164
added a commit
that referenced
this pull request
Nov 18, 2022
Due to backward compatibility reasons, React Navigation 5 and 6 support navigating to a screen in a child navigator with `navigation.navigate(ScreenName)` syntax. But this is problematic with the new architecture - it only works if the navigator is already mounted, doesn't work with TypeScript, etc. That's why there's a special API to navigate to a nested screen (`navigation.navigate(ParentScreenName, { screen: ScreenName })`).
This drops this behavior and adds a prop to explicitly enable it to make it easier to migrate. This prop will be removed in the next major.
josemak25
pushed a commit
to josemak25/react-navigation
that referenced
this pull request
Nov 21, 2022
…t-navigation#10905) Due to backward compatibility reasons, React Navigation 5 and 6 support navigating to a screen in a child navigator with `navigation.navigate(ScreenName)` syntax. But this is problematic with the new architecture - it only works if the navigator is already mounted, doesn't work with TypeScript, etc. That's why there's a special API to navigate to a nested screen (`navigation.navigate(ParentScreenName, { screen: ScreenName })`). This drops this behavior and adds a prop to explicitly enable it to make it easier to migrate. This prop will be removed in the next major.
satya164
added a commit
that referenced
this pull request
Nov 28, 2022
Due to backward compatibility reasons, React Navigation 5 and 6 support navigating to a screen in a child navigator with `navigation.navigate(ScreenName)` syntax. But this is problematic with the new architecture - it only works if the navigator is already mounted, doesn't work with TypeScript, etc. That's why there's a special API to navigate to a nested screen (`navigation.navigate(ParentScreenName, { screen: ScreenName })`).
This drops this behavior and adds a prop to explicitly enable it to make it easier to migrate. This prop will be removed in the next major.
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.
Due to backward compatibility reasons, React Navigation 5 and 6 support navigating to a screen in a child navigator with
navigation.navigate(ScreenName)syntax. But this is problematic with the new architecture - it only works if the navigator is already mounted, doesn't work with TypeScript, etc. That's why there's a special API to navigate to a nested screen (navigation.navigate(ParentScreenName, { screen: ScreenName })).This drops this behavior and adds a prop to explicitly enable it to make it easier to migrate. This prop will be removed in the next major.