This repository presents a benchmark comparison between two popular navigators from the React Navigation ecosystem:
@react-navigation/stack: A JavaScript-based stack navigator
@react-navigation/native-stack: A performant native stack navigator powered by react-native-screens
Using the Marco performance benchmarking tool, we’ve measured screen-to-screen navigation time to evaluate how each navigator performs under real-world conditions.
Android (RealDevice): Native Stack shows clear performance gains:
Simple: 73.1 ms → 43.7 ms (~40% faster)
Complex: 126.3 ms → 106.9 ms (~15% faster)
iOS (Simulator) : JS-based navigation is slightly faster, with performance nearly comparable to native.
Complex: 68.6 ms → 54.5 ms (~20.5% faster)
We tested navigation performance from Screen A to Screen B in two configurations:
Includes multiple interactive UI elements:
FlatList
with selectable itemsReport Name | Description |
---|---|
JS_Simple |
JS Stack (@react-navigation/stack ) - Simple Screen |
Native_Simple |
Native Stack (@react-navigation/native-stack ) - Simple Screen |
JS_Complex |
JS Stack - Complex Screen |
Native_Complex |
Native Stack - Complex Screen |
Start Marker – Button onPress Event:
onPress
event.PerformanceTracker.track()
with a custom marker name (e.g., "Start_Navigation"
).End Marker – Screen B Render Completion:
PerformanceTracker
to capture the onDraw event, which marks the end of the transition."End_Navigation"
in the logs.📌 These two markers allow Marco to calculate the time taken to complete the navigation between screens.
We instrumented the navigation flow using Marco Markers at two key points:
Marker Name | Description |
---|---|
Start_Navigation |
Captured when the navigation button is pressed on Screen A |
End_Navigation |
Captured when Screen B finishes rendering |
🧾 Navigation Time = End_Navigation
- Start_Navigation
| Navigator | Android RealDevice (Simple) | Android RealDevice (Complex) | iOS Simulator (Complex) |
| —————————————– |—————————–|——————–|————————-|
| @react-navigation/stack
(JS) | 73.1 ms | 126.3 ms | 54.5 ms |
| @react-navigation/native-stack
(Native) | 43.7 ms | 106.9 ms | 68.6 ms |
🔗 Live Benchmark Results: Click here
We are using the Marco tool to mark events and CLI tools provided by Marco to visualize the results. For more details refer: Marco Documentation We use Maestro for scripting navigation interactions.
Ensure Maestro is installed and accessible:
maestro -v
# JS Stack
maestro test .maestro/tests/AndroidScript/navigation-benchmark-js.yml
# Native Stack
maestro test .maestro/tests/AndroidScript/navigation-benchmark-native.yml
# JS Stack
maestro test .maestro/tests/iosScript/navigation-benchmark-js.yml
# Native Stack
maestro test .maestro/tests/iosScript/navigation-benchmark-native.yml
yarn marco generate --platform android
yarn marco generate --platform ios
📁 Reports will be saved in:
marco-reports/android/
marco-reports/ios/
🛠️ Before visualization, ensure correct
path
andreportName
are set inmarco.config.js
.yarn marco visualize --platform android yarn marco visualize --platform ios