React Native interview question · Most asked

How does navigation work with Expo Router?

Create a free account to save this page, take notes and track your progress. Sign in

Summary

Expo Router is file-based: files in the app/ directory become routes, _layout.tsx files define navigators (Stack, Tabs), (group) folders organise screens without changing URLs, and [param] files are dynamic routes.

Longer Answer

Navigate with <Link href="/contact/42"> or router.push(...); read params with useLocalSearchParams(). Because every screen has a URL, deep links (myapp://contact/42) and web URLs work without extra configuration once a scheme is set. Protected areas are implemented by a layout that redirects to sign-in when there's no session.

Key Points

  • Files = routes; _layout = navigator.
  • (groups) don't affect URLs; [id] captures params.
  • Deep links come for free; params are strings.

Deep dive: Mobile Apps with React Native and Expo: Navigation with Expo Router

Explanation

What interviewers look for

Understanding file-based routing, dynamic segments and how deep links map to screens.

Follow-up questions

  • How would you protect screens that require sign-in?
  • How do you handle a deep link to a screen whose data isn't loaded?

More most-asked React Native questions

← All React Native questions

Was this page helpful?