October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Expo Router: Plan URLs and Layouts Around User Flows

Expo Router files define routes and URLs. Plan destinations, route groups, layout boundaries, default entries, and Back behavior before implementing screens.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before building screen contents, decide what each route’s URL is, which layout owns it, and how people reach it. Expo Router turns files in src/app (or the configured app directory) into routes, so a planned tree is both a file organization and a map of web URLs and native deep links. Keep shared components and utilities outside that directory to avoid treating them as routes. Expo’s core concepts and introduction explain this file-based model.

Start with destinations and URLs

Write down the screens people can reach, including those opened from a link outside the app. Assign each a URL before choosing its file location. This makes it easier to spot duplicate destinations, unstable paths, or a deep link that would land in the wrong navigation context.

As an Amazon Associate I earn from qualifying purchases.

Separate fixed path segments from identifiers. A product page might use /products/[productId]: products is a static segment, while [productId] represents a dynamic parameter. Plain folder and file names create path segments; square brackets mark dynamic route parameters. An index.tsx file is the default route for its directory. See Expo Router’s notation guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use folders to express ownership and behavior

Route groups, written in parentheses, organize routes without adding a segment to the URL. They are useful when screens need a distinct navigator or shared layout but should retain a particular public path. For example, a group can separate a signed-in area from public screens without making the group name part of the address.

#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

Use a group because it represents a meaningful boundary—such as a section with its own tabs or stack—not simply to make the tree look tidier. When routes share a URL across groups, the URL alone may not determine the visible navigation context; test how a direct link selects its context and what Back does. Expo documents shared-route behavior, including alphabetic group selection for one shared-route pattern, in its shared routes guide.

Place layouts only at real navigation boundaries

A _layout.tsx applies layout or navigation behavior to routes below it. It can define a stack, tabs, drawer, or another navigator, and it can host shared providers or app initialization. Plan each layout by stating what it contributes: persistent tabs, a detail stack, a modal flow, a common header, or shared setup. Expo’s navigation layouts guide describes these roles.

Do not add a nested navigator merely because a folder exists. Expo advises nesting when the flow needs it; otherwise, a parent navigator may already provide the required relationship. Every extra navigator adds another boundary to reason about when entering a route and navigating back.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose navigation from the user’s flow

A common arrangement is tabs for primary sections, with a stack inside a tab that has multiple screens. A section’s detail page can then sit on that section’s stack while the top-level tabs remain available. A stack is appropriate when moving to a destination should push a screen and preserve a back path; tabs fit switching among primary sections. Expo’s common navigation patterns, stack guide, and navigation guide cover these behaviors.

Compare the candidate structures against the actual flows rather than choosing a navigator by habit:

  • URL and deep-link behavior: Does each public path remain clear, and does an external link open the expected screen and context?
  • Movement between screens: Should the action push onto a stack, switch a tab, or replace a page within a section?
  • Shared interface: Which screens need the same tabs, header, providers, or other persistent layout behavior?
  • Platform presentation: Should iOS and Android use system-style tabs while web uses a different presentation?
  • Structural cost: Does each nested navigator solve a user-visible flow, or just add complexity?

Expo provides JavaScript tabs and native tabs as alternatives; review their platform behavior and implementation guidance before settling on one. The native-tabs guide currently says expo-router/native-tabs is available in SDK 58 and later, while SDK 54–57 use expo-router/unstable-native-tabs. Because that import is version-sensitive, confirm the target project’s SDK against the current native tabs guide. For JavaScript tabs, see the tabs guide.

Decide the default routes

Choose the destination for / and for any nested section that needs a default. Use index routes to express those defaults. A route group can help organize alternatives that share a public URL, but it should not obscure which screen is expected when someone opens a path directly. Verify both the root entry and each important nested entry in the proposed tree.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Walk through entry, navigation, and Back

For every important flow, trace three ways into the screen: opening its URL directly, navigating there from another screen, and returning with Back. Pay particular attention to shared routes, because group selection may change the surrounding layout or active tab. Write down the expected result for each case before implementation; a route tree that looks neat can still encode the wrong entry behavior.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

A practical route-tree planning sequence

  1. List destinations: Include screens reached from inside the app and destinations opened by external links; assign each a URL.
  2. Mark path notation: Identify static segments and dynamic identifiers, such as /products/[productId].
  3. Group related screens: Use folders for shared behavior and parenthesized groups when navigator or organizational separation should not alter the URL.
  4. Define layout boundaries: Add a root _layout.tsx and nested layouts only where a concrete navigator or shared layout behavior is needed.
  5. Set defaults: Decide the route for / and nested sections, using index routes where appropriate.
  6. Trace flows: Test direct URL entry, in-app movement, and Back for key destinations, especially shared routes.
  7. Keep implementation files separate: Put reusable components, hooks, and utilities outside the route directory, then build screen contents against the settled structure.

This is a planning approach based on Expo’s route notation, layout, and navigation guidance; Expo does not prescribe this exact sequence.

Example: a small catalog app

For an app with a catalog tab, saved items, and product details, a conceptual tree could look like this:

src/app/
  _layout.tsx
  (tabs)/
    _layout.tsx
    index.tsx
    saved.tsx
    products/
      [productId].tsx
  account.tsx

Before creating those files, decide whether a product detail belongs inside the catalog tab’s stack, whether account access is a separate top-level destination, and what URL should open each screen from a link. The tree is only a starting point: if the product route must appear in multiple tab contexts, a shared-route design may be appropriate, but its deep-link selection and Back behavior need explicit verification.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Expo’s core concepts, notation, and navigation pattern documentation provide the conventions behind this kind of plan. For specialized behavior, consult the official custom navigators guide.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.