WhoBuilt

Expert Guide to React Navigation

Mar 31, 2021· 47 min· 1.9K views·Watch on YouTube

Speakers

Callstack React Native developers Satya and Matteo join the React Native Show host and Mathias to discuss React Navigation’s history, version 5, upgrading, and version 6.

How React Navigation began

Satya describes React Navigation as a library for managing screens, transitions, tabs, and drawers, with both navigation logic and UI. It grew from earlier options including Navigator, NavigatorIOS, NavigationExperimental, and Expo’s ExNavigation. The team aimed to offer a flexible, cross-platform API that was easier to use.

Performance and native navigation

The team moved animations to React Native’s native driver, then used Gesture Handler and Reanimated for smoother gestures, including the drawer. React Navigation also added native stack and Material Top Tabs implementations. Satya says the JavaScript stack offers more customization, while native options can suit performance-critical apps.

Version 5’s dynamic API

React Navigation 5 replaced static configuration with a component-based API, so developers can use React state to control screens and update headers, translations, and themes dynamically. Other additions included setOptions, hooks, a theming API, customizable screen animations, and a more familiar event system.

Upgrading and version 6 changes

Matteo says the version 5 migration took careful planning and work to update how components access route and screen state. His team used the new API to simplify a large app’s navigation, while also investigating TalkBack accessibility behavior on Android. Satya previews version 6 changes, including non-merged route params by default, updated modal and drawer animations, headers by default in drawer and bottom tab navigators, and per-screen options.

Supporting React Navigation

Satya says the project launched GitHub Sponsors to fund more development time, and asks users to support the library. The host also encourages sponsorship, pointing to React Navigation’s role in the React Native ecosystem.

Takeaways

  • Choose between JavaScript and native navigators based on the customization and performance needs of each screen.
  • The component-based API lets teams use React state for navigation configuration, headers, and themes.
  • Plan a version 5 migration carefully: package renames may be simple, but updating route and screen state can take more work.
  • Check TalkBack behavior on Android when upgrading, since Matteo reports accessibility issues under investigation.
  • Version 6 changes defaults for route params, headers, and animations, so review navigator behavior during upgrades.

Mentioned in this talk

Search inside this talk

What was claimed 17

Show all 17 facts

Related talks