Sahoo contrasts the dynamic API introduced in React Navigation 5 with the static APIs in versions 1 through 4. Dynamic navigation supports conditional and lazy rendering, but makes it difficult to derive types and deep links without duplicating the navigation structure. The new static API is an optional addition built on the existing dynamic API, so apps do not need to be rewritten.
A peek into React Navigation 7
Speaker
Satyajit Sahoo, a front-end developer at Comstock and lead maintainer of React Navigation, presents React Navigation 7 at React Native 2023 on the Callstack channel.
The static API defines screens in an object keyed by screen name, with components, options, and linking configuration. `createStaticNavigation` turns that navigator into a component similar to `NavigationContainer`. The `StaticParamList` helper infers types from the root navigator and nested navigators, reducing the manual type definitions needed for autocomplete.
The static API adds an `if` option that takes a React hook returning a Boolean, allowing screens to appear or disappear based on authentication state. Sahoo also says static and dynamic navigators can be used together, such as embedding a static-configured component inside a dynamic navigator when screens depend on backend data.
React Navigation 7 includes a standalone drawer package for cases where a drawer is needed without a navigator. It also adds custom tab transition animations and a side layout for bottom tabs, with options for a custom sidebar. This avoids swapping between separate drawer and tab navigators on resize, which could discard navigation history and local form state.
Other planned or included changes mentioned are better right-to-left support, a `popTo` method that returns to a named screen with parameters, and component updates based on newer Material Design. Sahoo directs attendees to the alpha at reactnavigation.org/next and asks them to test it and report bugs or improvements; he notes that the documentation is incomplete.
Takeaways
- An optional static configuration can make navigation types and deep-link setup easier to derive.
- Use conditional screen availability for authentication flows instead of manually changing navigation after login or logout.
- Combine static and dynamic navigation when some screens are fixed and others depend on runtime data.
- Keep one tab navigator and adapt its layout for larger screens to preserve navigation and form state.
- Treat alpha releases as feedback opportunities, especially when documentation and APIs are still evolving.
Mentioned in this talk
Search inside this talk
What was claimed 12
- role atSatyajit Sahoo is lead maintainer at React Navigation
“Michał and I work on React Navigation”
0:05inComponent First Navigation In React NativeYouTube Verified3 sources· Talk
- works atSatyajit Sahoo works at Comstockfront-end developer
“I’m a front-end developer at Comstock.”
YouTube Unverified1 source· Talk
- featureReact Navigation: Version 7 adds an optional static API alongside the existing dynamic API.
“we’re reintroducing the static API to React Navigation”
YouTube Unverified1 source· Talk
- featureStatic API: StaticParamList automatically infers types for a root navigator and its nested navigators.
“automatically infers the types of that navigator and all nested navigators”
YouTube Unverified1 source· Talk
- featureStatic API: The if option conditionally includes a screen based on a React hook returning a Boolean.
“If it returns true, we have the screen in the navigator; if it returns false, we don’t.”
YouTube Unverified1 source· Talk
- featureReact Navigation: Static and dynamic APIs can be used together.
“we want you to be able to use both the static and dynamic APIs together”
YouTube Unverified1 source· Talk
- launchedReact Navigation launched Drawer packageStandalone drawer package extracted from its drawer implementation
“we took over the package, extracted our drawer implementation from React Navigation, and published it as a standalone package”
YouTube Unverified1 source· Talk
- usesReact Navigation uses Canny
“We use Canny for React Navigation to track what people want.”
YouTube Unverified1 source· Talk





