React Navigation 7.0 released with a new static API
React Navigation 7.0 has been released. The documentation is now live at reactnavigation.org, and the v6 docs remain available separately. According to the announcement, the release aims to improve the developer experience with a new static API, and brings many new features, improvements and bug fixes.
Static API
The release adds an optional static API for configuring navigators. It is meant to simplify navigator setup and make TypeScript typing and deep linking easier to handle.
Performance and layout
- Preloading screens: Many navigators can now preload screens before the user navigates to them. Preloading screens a user is likely to visit next can improve perceived performance.
- Layout props: Navigators and screens accept layout props, which let developers augment them with additional UI and behavior.
Web improvements
The built-in navigators have better web support, including rendering anchor tags for more elements. The Link and useLinkProps APIs have been reworked to take screen names rather than paths.
Navigator features
- Search bar in headers: Every navigator that has a header now supports a search bar, configurable through the
headerSearchBarOptionsoption. - Sidebar tabs: The Bottom Tab Navigator can display tabs on the side by setting
tabBarPositionto'left'or'right'. - Tab animations: The Bottom Tab Navigator supports animations when switching tabs, customizable via the
animationoption. - Standalone drawer: The drawer used by
@react-navigation/draweris now published as its own package,react-native-drawer-layout.
Debugging
A new useLogger devtool logs navigation actions and state to the console for debugging.
Upgrading
Version 7 contains breaking changes, and the team has published a detailed upgrade guide covering migration from v6 and the full list of changes. The earlier release candidate blog post offers a more detailed walkthrough of the highlights.
Credits
The announcement credits contributors including Michał Osadnik, documentation help from Software Mansion, the React Native Screens maintainers, and dedicated maintenance time from Callstack. The project also invites support through GitHub Sponsors.
Links
Source: reactnavigation.org