Sign in

React Navigation

@reactnavigation.org
79 followers 4 following 16 posts

reactnavigation.org

PostsRepliesMedia
React Navigation @reactnavigation.org · 20/12/2025
The new `routeNamesChangeBehavior` prop makes it simple to handle deep links to screens behind auth. It's also backported to React Navigation 7, so you can try it now.
110
React Navigation @reactnavigation.org · 20/12/2025
The new `pushParams` API lets you push new entries to history without pushing a new screen. So you can keep filter changes in the history stack, show other components such as modals based on params, and more.
110
React Navigation @reactnavigation.org · 20/12/2025
In static configuration, the type of params is inferred based on the deep link configuration as well. Inspired by @tanstack.com router 🫶
110
React Navigation @reactnavigation.org · 20/12/2025
The `useRoute`, `useNavigation` & `useNavigationState` now accept screen name as an argument. - Pass a parent screen name to get parent screen data - Get automatic type inference based on screen name
110
React Navigation @reactnavigation.org · 20/12/2025
Native Bottom Tabs by default means native look and feel for your tabs, like liquid glass on iOS 26. Made possible thanks to React Native Screens by @swmansion.com
120
React Navigation @reactnavigation.org · 27/10/2025
The latest version of React Navigation now has a new unstable API to automatically navigate to the correct screen after a conditional render (e.g., if a screen was opened via a deep link, but was behind auth): UNSTABLE_routeNamesChangeBehavior="lastUnhandled" reactnavigation.org/docs/auth-fl...
021
React Navigation @reactnavigation.org · 12/08/2025
Support for PlatformColor, DynamicColorIOS & CSS custom properties is coming to React Navigation's theming system 💅 Currently, it only supports plain color strings. But this will enable using design system tokens defined in native code or CSS without needing to redeclare them.
032
React Navigation @reactnavigation.org · 12/08/2025
It was broken for a while because the format of the stack traces had changed since the initial implementation. This is how it looked when it was broken. Not very useful.
111
React Navigation @reactnavigation.org · 12/08/2025
Do you use React Navigation devtools? It should now display the stack trace correctly. So you can easily see where the navigation originated from.
111
React Navigation @reactnavigation.org · 24/04/2025
We recently updated our testing guide with recommendations and examples. Are there any use cases that you'd like to be documented? reactnavigation.org/docs/testing/
Guiding principles
When writing tests, it's encouraged to write tests that closely resemble how users interact with your app. Keeping this in mind, here are some guiding principles to follow:

Test the result, not the action: Instead of checking if a specific navigation action was called, check if the expected components are rendered after navigation.
Avoid mocking React Navigation: Mocking React Navigation components can lead to tests that don't match the actual logic. Instead, use a real navigator in your tests.
Following these principles will help you write tests that are more reliable and easier to maintain by avoiding testing implementation details.
031
React Navigation @reactnavigation.org · 01/04/2025
The new `useRoutePath` hook in React Navigation can be used to get the path to the current route to create a shareable URL 🔗
const path = useRoutePath();

// Construct a URL using the path and app's base URL
const url = new URL(path, 'https://example.com');

// Now we have a shareable URL
console.log(url.href);
071