ArchiveExpo SnackDiscord and ForumsNewsletter

Expo Router FAQs

A list of common questions about Expo Router.

Missing back button

If you set up a modal or another screen that is expected to have a back button, then you'll need to add unstable_settings to the route's layout to ensure the initial route is configured. Initial routes are somewhat unique to mobile apps and therefore fit awkwardly in the system — improvements pending.

export const unstable_settings = {
  initialRouteName: 'index',

Expo Router versus Expo versus React Native CLI

Historically, React Native has been non prescriptive about how apps should be built, this is similar to using React without a modern web framework. Expo Router is an opinionated framework for React Native, similar to how Remix and Next.js are opinionated frameworks for web-only React.

Expo Router is designed to bring the best architectural patterns to everyone, to ensure React Native is leveraged to its fullest. For example, Expo Router's Async Routes feature enables lazy bundling for everyone. Previously, lazy bundling was only used at Meta to build the Facebook app.

Can I use Expo Router in my React Native app?

Yes, Expo Router is the framework for universal React Native apps. Due to the deep connection between the router and the bundler, Expo Router is only available in Expo CLI projects, with Metro. Luckily, you can use Expo CLI in any React Native project too!

What are the benefits of file-based routing?

  1. The file system is a well-known and well-understood concept. The simpler mental model makes it easier to educate new team members and scale your application.
  2. The fastest way to onboard new users is by having them open a universal link that opens the app or website to the correct screen depending on if they have the app installed or not. This technique is so advanced that it's usually only available to large companies that can afford to make and maintain the parity between platforms. But with Expo's file-based routing, you can have this feature out of the box!
  3. Refactoring is easier to do because you can move files around without having to update any imports or routing components.
  4. Expo Router has the ability to statically type routes automatically. This ensures you can only link to valid routes and that you can't link to a route that doesn't exist. Typed Routes also improve refactoring as you'll get type errors if links are broken.
  5. Async Routes (bundle splitting) improve development speed, especially in larger projects. They also make upgrades easier as errors are isolated to a single route, meaning you can incrementally update or refactor your app page-by-page rather than all at once (traditional React Native).
  6. Deep links always work, for every page. This makes it possible to share links to any content in the app, which is great for promoting your app, collecting bug reports, E2E testing, automating screenshots, and so on.
  7. Expo Head uses automatic links to enable deep-native integration. Features like Quick Notes, Handoff, Siri context, and universal links only require configuration setup, no code changes. This enables perfect vertical integration with the entire ecosystem of smart devices that a user has, leading to the types of user experiences that are only possible with universal apps (web ⇄ native).
  8. Expo Router has the ability to statically render each page automatically on the web, enabling real SEO and full discoverability of your app's content. This is only possible because of the file-based convention.
  9. Expo CLI can infer a lot of information about your application when it follows a known convention. For example, we could implement automatic bundle splitting per route, or automatically generate a sitemap for your website. This is impossible when your app only has a single entry point.
  10. Re-engagement features like notifications and home screen widgets are easier to integrate as you can simply intercept the launch and deep link, with query parameters, anywhere in the app.
  11. Like on the web, analytics and error reporting can easily be configured to automatically include the route name, which is useful for debugging and understanding user behavior.

Why should I use Expo Router over React Navigation?

Expo Router and React Navigation are both libraries from the Expo team. We built Expo Router on top of React Navigation to enable the benefits of file-based routing. Expo Router is a superset of React Navigation, meaning you can use any React Navigation components and APIs with Expo Router.

If file-based routing isn't right for your project, you can drop down to React Navigation and set up routes, types, and links manually.

How do I server-render my Expo Router website?

Basic static rendering (SSG) is supported in Expo Router v2. Server-side rendering currently requires custom infrastructure to set up.

Can I use React Navigation?

Yes! React Navigation is one of the most popular navigation libraries in the React Native ecosystem. It is maintained by the Expo team and supports Android, iOS, and the web.

React Navigation includes support for common navigation patterns, and it's fully customizable so you can achieve any navigation pattern, even if it's not built into the library.

See the Getting started guide in React Navigation documentation for more information on how to get started.

Can I use React Native Navigation by Wix?

This library is not available in the Expo Go app and is not yet compatible with expo-dev-client.

We recommend createNativeStackNavigator from React Navigation to use Android and iOS native navigation APIs.