Navigation Questions with Answers

14 practice questions on Navigation (React Native) with answers and step-by-step solutions. Try 10 samples below, then practise all 14 free in the AptiNest app.

Sample questions

Question 1Easy

Does React Native's core library ship a full screen-navigation system such as stacks and tabs?

  1. No; apps use libraries such as React Navigation or Expo Router
  2. Yes; the core Navigator component handles stacks, tabs and drawers
  3. Yes; navigation is built into the View component as a prop
  4. No; each screen must be shipped as a separate native app

Answer: A. No; apps use libraries such as React Navigation or Expo Router

Explanation

Navigation lives in community libraries. React Navigation and Expo Router (built on it) are the most common choices.

Step-by-step solution

  1. React Native's core library does not include a full navigation system.
  2. Navigation is provided by community libraries such as React Navigation.
  3. Expo Router is built on React Navigation, so the answer is option A.

Why the other options are wrong

  • B. Stacks, tabs and drawers come from navigation libraries, not the core Navigator in React Native.
  • C. Navigation is not a prop of View; it is a library feature.
  • D. Screens are not shipped as separate native apps.

Tip: Add React Navigation or Expo Router for stacks, tabs and drawers.

Question 2Easy

What is deep linking in a mobile app?

  1. Linking two apps so that they share one code bundle
  2. Preloading every screen into memory at startup
  3. Linking native libraries into the app at build time
  4. Opening a given screen from a URL like myapp://item/42

Answer: D. Opening a given screen from a URL like myapp://item/42

Explanation

Deep links map URLs to screens and params, so a link in an email or notification opens the right place in the app.

Step-by-step solution

  1. A deep link is a URL that opens a specific screen in the app.
  2. An example is myapp://item/42, which opens the item screen for id 42.
  3. So deep linking is opening a given screen from a URL, which is option D.

Why the other options are wrong

  • A. Deep linking is about URLs and screens, not sharing a code bundle between apps.
  • B. Deep linking does not preload screens into memory.
  • C. Deep linking is about URLs, not linking native libraries at build time.

Tip: Deep links map a URL to a screen and its params, so emails and notifications can open the right place.

Question 3Easy

A screen is opened with navigation.navigate('Profile', { id: 7 }). How does the Profile screen read the id?

  1. navigation.id
  2. route.params.id
  3. props.id directly
  4. this.state.params.id

Answer: B. route.params.id

Explanation

Params passed during navigation are available on the route prop (or useRoute()) as route.params.

Step-by-step solution

  1. The params passed to navigate are stored on the screen's route object.
  2. The Profile screen reads them from route.params.
  3. So the id is read as route.params.id, which is option B.

Why the other options are wrong

  • A. navigation.id is not where the params are stored.
  • C. Params are not passed as props directly in React Navigation.
  • D. Params are not in this.state; they are on the route.

Tip: Read navigation params from route.params, or use useRoute() in a function component.

Question 4Easy

Which navigator type typically shows a menu that slides in from the side of the screen?

  1. Drawer navigator
  2. Stack navigator
  3. Bottom tab navigator
  4. Modal navigator

Answer: A. Drawer navigator

Explanation

A drawer navigator renders a side menu. Tabs sit at the bottom or top, and stacks push screens on top of each other.

Step-by-step solution

  1. A drawer navigator shows a side menu that slides in from the edge of the screen.
  2. Bottom tabs sit at the bottom, and stacks push screens on top of each other.
  3. So the navigator with a side menu is option A, the drawer navigator.

Why the other options are wrong

  • B. A stack pushes screens one on top of another; it has no side menu.
  • C. Bottom tabs show tabs along the bottom, not a side menu.
  • D. A modal screen covers the current screen; it is not a side menu.

Tip: Drawer for a side menu, tabs for top-level sections, and stack for screens that go deeper.

Question 5Medium

Why would an app nest a bottom tab navigator inside a stack navigator?

  1. Because tab navigators can only be used inside stacks
  2. So detail screens can be pushed over the tab bar
  3. To make every tab share one single scroll position
  4. To stop the tabs from keeping their screens mounted

Answer: B. So detail screens can be pushed over the tab bar

Explanation

A common layout is a root stack whose first screen is the tab navigator. Detail or modal screens are pushed on the stack and cover the tab bar.

Step-by-step solution

  1. A common layout uses a root stack whose first screen is the tab navigator.
  2. Detail screens pushed on the stack cover the tab bar.
  3. So the stack lets detail screens appear over the tabs, which is option B.

Why the other options are wrong

  • A. Tab navigators can be used at the top level or inside a stack; they are not limited to stacks.
  • C. Scroll positions are per screen and are not shared by tabs in this layout.
  • D. Tabs keep their screens mounted once visited, so nesting does not stop that.

Tip: Nest tabs in a root stack when detail or modal screens must cover the tab bar.

Question 6Medium

How does Expo Router decide which routes an app has?

  1. From a routes.json file the developer edits by hand
  2. From the files in the app directory
  3. From the order of screens passed to a navigator prop
  4. From the native AndroidManifest and Info.plist files

Answer: B. From the files in the app directory

Explanation

Expo Router maps files under app/ to routes, much like file-based routing on the web, and builds on React Navigation underneath.

Step-by-step solution

  1. Expo Router is file-based.
  2. Files in app/ become routes.

Why the other options are wrong

  • A. No routes.json.
  • C. Not from navigator order.
  • D. Not native files.

Tip: File = route.

Question 7Medium

Screen A must refetch data every time the user returns to it from screen B. Why is useEffect(fn, []) not enough?

  1. useEffect never runs in components that are used as screens
  2. A stays mounted, so its mount-only effect never reruns
  3. The empty array makes the effect run before every render
  4. useEffect runs only once per app launch, not per screen

Answer: B. A stays mounted, so its mount-only effect never reruns

Explanation

Because A was never unmounted, its mount effect does not repeat. useFocusEffect or the 'focus' event runs code each time the screen gains focus.

Step-by-step solution

  1. Screen A stays mounted when the user goes to B and back.
  2. A mount-only effect runs when the component mounts, and that happens only once.
  3. So the effect does not run again when A regains focus, which is option B.

Why the other options are wrong

  • A. UseEffect runs normally in screens; screens are ordinary components.
  • C. An empty array makes the effect run once after mount, not before every render.
  • D. UseEffect runs on every mount, not once per app launch.

Tip: Use useFocusEffect or the focus event to run code each time a screen gains focus.

Question 8Medium

In a stack navigator, the user goes from screen A to screen B. What happens to screen A?

  1. It stays mounted underneath, keeping its state
  2. It is unmounted and rebuilt when the user returns
  3. It is paused and its state is written to storage
  4. It is unmounted only if B is a modal screen

Answer: A. It stays mounted underneath, keeping its state

Explanation

Stack screens below the top one remain mounted, so returning to A shows it exactly as it was. Tab screens are also kept mounted once visited.

Step-by-step solution

  1. Stack navigators keep screens below the top one mounted.
  2. When the user goes from A to B, A stays underneath with its state.
  3. So screen A stays mounted and keeps its state, which is option A.

Why the other options are wrong

  • B. A is not unmounted, so it does not have to be rebuilt when the user returns.
  • C. The state is kept in memory; it is not written to storage.
  • D. A stays mounted whether or not B is a modal.

Tip: Screens below the top of a stack stay mounted, so their state is kept while the user is on a screen above.

Question 9Hard

What is the main reason to choose a native stack navigator over a JavaScript-based stack?

  1. It allows fully custom JS animations for every screen
  2. It uses the platform's own navigation primitives
  3. It works without a NavigationContainer at the root
  4. It removes the need to declare screens in advance

Answer: B. It uses the platform's own navigation primitives

Explanation

A native stack uses UINavigationController on iOS and fragments on Android, giving native gestures and performance. A JS stack trades that for more customisation.

Step-by-step solution

  1. A native stack uses the platform's own navigation primitives.
  2. On iOS that is UINavigationController, and on Android it uses fragments.
  3. So the main reason is native gestures and performance, which is option B.

Why the other options are wrong

  • A. A JS stack allows more custom JS animations; a native stack does not.
  • C. Both kinds of stack need a NavigationContainer at the root.
  • D. Both kinds still need screens declared in advance.

Tip: Use a native stack for platform-like gestures and speed; use a JS stack for more custom behaviour.

Question 10Hard

What is the recommended way to stop users going 'back' to the login screen after they sign in?

  1. Render different screens based on auth state
  2. Call navigate('Home') and then hide the back button
  3. Disable the hardware back button for the whole app
  4. Clear AsyncStorage each time the login screen mounts

Answer: A. Render different screens based on auth state

Explanation

If the navigator only defines the signed-in screens when the user is signed in, the login screen does not exist in that state, so nothing can navigate back to it.

Step-by-step solution

  1. The app defines different screens for signed-in and signed-out users.
  2. When the user is signed in, the login screen is not in the navigator at all.
  3. So nothing can navigate back to it, which is option A.

Why the other options are wrong

  • B. Navigate and hiding the back button still leave the login screen in the stack.
  • C. Disabling the hardware back button affects the whole app and is not the recommended fix.
  • D. Clearing AsyncStorage does not change the navigation stack.

Tip: Choose the screens by auth state so that the login screen does not exist after sign-in.

Practise all 14 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all React Native topics · All topics