Replies: 10 comments 8 replies
-
Would would the new API do navigate to child navigators look like? Will users have to keep track if navigator is mounted? |
Beta Was this translation helpful? Give feedback.
-
@satya164 how would you work around this problem in react navigation 6? |
Beta Was this translation helpful? Give feedback.
-
Additional remarks: Rename
|
Beta Was this translation helpful? Give feedback.
-
Just a couple comments.
|
Beta Was this translation helpful? Give feedback.
-
TabView will have a significant API change released together with React Navigation v7, I've described the changes here: react-navigation/rfcs#88 |
Beta Was this translation helpful? Give feedback.
-
One question about "Deprecate the bubbling to child navigators": in v7 usage of nested navigators will be not recommended or will there be another way to navigate to a screen inside child navigator besides the legacy one? |
Beta Was this translation helpful? Give feedback.
-
@satya164 any plans to support RTL in version 7 ? |
Beta Was this translation helpful? Give feedback.
-
What is the expected release date for v7? 2024 or 2025? |
Beta Was this translation helpful? Give feedback.
-
This is a discussion to keep track of things that we want to change in React Navigation 7. I plan it to be a much smaller release with very few breaking changes. It's still very far in future, but I'm creating this issue to keep track of the changes that I want to make.
Deprecate the bubbling to child navigators ✅
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 })
).In React Navigation 7, I want to deprecate this behavior and disable it by default. For old projects which have such code, they will be able to add a prop on
NavigationContainer
to enable it.Drop the ability to navigate with a
key
✅Currently, you can specify a route
key
to navigate to, e.g.navigation.navigate({ key: 'someuniquekey' })
. But I feel that it's exposing implementation details and isn't ideal. None of the other actions support such usage either.In addition, we have already added a better API (
getId
) which can be used for similar use cases - and gives users full control since they provide the ID and it's not autogenerated by the library.So I want to drop navigating by a
key
entirely in favor of thegetId
prop.Align
onReady
andnavigationRef.isReady()
✅Currently the
onReady
prop andnavigationRef.isReady()
work slightly differently. TheonReady
callback fires whenNavigationContainer
finishes mounting and we have also checked for deep links. ThenavigationRef.isReady()
method additionally checks if there are any navigators rendered - which may not betrue
if the user is rendering their navigators conditionally inside aNavigationContainer
that's not rendered conditionally.We should either add the additional check to trigger
onReady
or separate it to a different method and prop.Freeze navigation state object during development
Mutating the navigation state can cause various issues. But I have seen people doing this either accidentally or intentionally. So we'll freeze it during development to avoid this. It'll not be frozen in production to avoid the performance overhead of deep freezing on every change.
Make all screens after
presentation: 'modal'
as modal unless specifiedNon-modal screens pushed after
presentation: 'modal'
have glitchy animation with regular stack, and get pushed below the modal in native-stack. There's no perfect solution, but automatically turning those screens into modals may make sense.Disable transform and scale animations when
reduceMotion
is enabledCurrently we don't respect reduce motion. We should respect it and disable transform and scale animations. We also need to investigate how native navigation animations change and do the same for the animations trying to match native animations.
Remove the
independent
prop fromNavigationContainer
in favor of a component ✅TODO
Beta Was this translation helpful? Give feedback.
All reactions