WhoBuilt

Changes in React Navigation 5

Apr 9, 2021· 6 min· 205 views·Watch on YouTube

An unnamed Callstack speaker talks about React Navigation 5’s animation and native-navigation changes with host Mike.

Why animations moved beyond JavaScript

React Navigation began with JavaScript animations to support fast iteration, but demanding app tasks could block them and cause choppy motion. The team wanted smoother animations with fewer dropped frames.

Using native-driven animations and gestures

The team reworked the architecture so animations use React Native’s native driver. It also adopted Gesture Handler and Reanimated; the Drawer Navigator uses Reanimated to reduce lag during swipes.

Adding a native stack option

React Navigation 5 introduced Native Stack, built with React Native Screens and designed to provide a fully native stack experience through the React Navigation API. It offers less customization than the JavaScript stack.

Making Material Top Tabs native

Material Top Tabs moved to the native ViewPager library for swipeable tabs on Android and iOS. The speaker recommends native navigators for performance-critical apps and the JavaScript stack when customization matters and screens are not especially demanding.

Combining JavaScript APIs with native motion

The speaker says the hybrid approach brings together React Navigation’s JavaScript API and native-style animations. It also ends long efforts to reproduce Apple animation curves in JavaScript.

Takeaways

  • Use native-driven animations when heavy app work could interrupt JavaScript animations.
  • Consider Gesture Handler and Reanimated for smoother swipe interactions.
  • Choose Native Stack when native behavior and performance matter more than deep customization.
  • Use the JavaScript stack when its extra customization suits the app’s performance needs.

Mentioned in this talk

Search inside this talk

What was claimed 10

Related talks