WhoBuilt

It all starts with navigation

Sep 14, 2018· 29 min· 5.4K views·Watch on YouTube

Speaker

Krzysztof Magiera, a React Native engineer at Callstack who previously worked on Facebook’s React Native team, traces the evolution of React Native navigation and explains how native gestures and screens address performance and resource issues.

Why navigation has so many solutions

Magiera frames navigation as an early, consequential choice for React Native developers: switching libraries later can mean rewriting much of an app. He reviews the field’s evolution and says the range of solutions reflects how difficult navigation is, with more changes likely ahead.

From NavigatorIOS to native animations

NavigatorIOS wrapped iOS’s UINavigationController, but offered limited customization and did not suit Android’s different navigation patterns. The cross-platform Navigator used route configuration and push, pop, and reset commands, but its JavaScript-driven animations could stutter while screens rendered or loaded data. NavigatorExperimental used Animated’s native driver to move transitions off the JavaScript thread, though its name made adoption harder.

Gestures and customizable navigation

Wix’s React Native Navigation created native view controllers for screens, while placing the navigation bar outside the app made some customizations and gestures difficult. Magiera describes React Native Gesture Handler as a way to recognize gestures on the UI thread and connect their results to native-driven animations. React Navigation offers extension points for custom behavior and can use native transitions and back-swipe gestures.

Why screens need a native lifecycle

Magiera compares view hierarchies and explains that screens kept in memory can retain images, location tracking, camera sessions, and rendering loops even when they are offscreen. Those views may miss native window lifecycle events that would let them release resources. Native Screens provides screen containers with an active state, keeping only the screens needed for a tab or stack transition active.

Native Screens in practice

Magiera says Native Screens can be integrated with React Navigation by replacing some views with native screen components, without changing app code. He also says it would be included in Expo SDK 30. In his comparison, an Android app pushing many image-heavy screens slows down without Screens, while the version using Screens transitions faster because image views can release resources.

Takeaways

  • Compare navigation libraries by their customization needs and migration costs before choosing one.
  • Move animation and gesture work to the UI thread when JavaScript activity causes stutters.
  • Treat navigation as a lifecycle boundary: offscreen screens may still hold memory, CPU, or system resources.
  • Use native screen containers when apps need inactive screens to release resources.
  • Check the tradeoffs of native navigation bars, especially when custom bars or interactive dismissal gestures matter.

Mentioned in this talk

Search inside this talk

What was claimed 13

Related talks