React Native · Mobile UI at native speed

How does navigation work in React Native?

Easynavigationreact navigationroutingUpdated Oct 2026
Quiz this track

Short answer

Navigation is provided by a library such as React Navigation or Expo Router. You compose stacks, tabs and drawers, pass typed params, and configure linking so URLs and deep links map to screens.

Unlike the web, there is no browser history or URL bar. A navigation library owns the navigation state, renders the active screen, and handles gestures, headers and the Android back button. React Navigation is the most common choice; Expo Router adds file-based routing on top of it.

tsx
import { createNativeStackNavigator } from "@react-navigation/native-stack";

type RootStackParamList = {
  Home: undefined;
  Detail: { id: string };
};

const Stack = createNativeStackNavigator<RootStackParamList>();

export function RootNavigator() {
  return (
    <Stack.Navigator>
      <Stack.Screen name="Home" component={HomeScreen} />
      <Stack.Screen name="Detail" component={DetailScreen} />
    </Stack.Navigator>
  );
}
A typed param list gives compile-time checks for route names and params.

Structure that scales

  • A root stack for modals and authentication gates
  • Tab navigators for top-level destinations
  • Nested stacks per tab so each keeps its own history
  • A typed param list shared across the app
  • A linking configuration so every screen has a URL

Avoid passing non-serialisable values such as functions or large objects in params. Pass identifiers and read the data from a store or query cache. That keeps navigation state serialisable for state persistence and deep linking.

The Android hardware back button is handled by the navigator, but custom modals and unsaved-changes flows still need an explicit back handler.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1What is the difference between a stack and a tab navigator?
  2. 2How do you pass data between screens?
  3. 3How does deep linking integrate with navigation?
  4. 4How do you guard authenticated routes?

Say it in the interview

I use React Navigation, usually with a root stack and tab navigators that contain their own stacks. I define a typed param list, pass identifiers rather than large objects, and configure linking so deep links and URLs resolve to screens. For auth I conditionally render screens based on session state, which prevents protected screens from mounting before login.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live React Native mock interview and get scored feedback on depth, clarity and confidence.