Skip to main content

Quick Start

This tutorial walks you through creating a simple multi-screen app with Expo Router.

Create a New Project

Create a new Expo app with Expo Router:

Project Structure

Your initial project structure:

Building Your First Routes

1

Create the Root Layout

The root layout wraps all your routes. Update app/_layout.tsx:
app/_layout.tsx
2

Create the Home Screen

Update app/index.tsx with navigation:
app/index.tsx
3

Create an About Screen

Create a new file app/about.tsx:
app/about.tsx
4

Create a Dynamic Route

Create app/profile/[id].tsx for dynamic user profiles:
app/profile/[id].tsx
5

Run Your App

Start the development server:
Then:
  • Press i for iOS simulator
  • Press a for Android emulator
  • Press w for web browser
  • Scan the QR code with Expo Go app

Your Project Structure

You should now have:

Understanding What You Built

File-Based Routing

Each file in the app directory becomes a route:
  • index.tsx/ (root path)
  • about.tsx/about
  • profile/[id].tsx/profile/:id (dynamic segment)
You used two ways to navigate:
  1. <Link> component - Declarative navigation:
  1. router object - Imperative navigation:

Dynamic Parameters

The [id].tsx file creates a dynamic route:
Accessing /profile/john makes id equal to "john".

Layouts

The _layout.tsx file wraps all routes in that directory:

Next Steps

1

Add More Routes

Create additional screens:
app/settings.tsx
2

Add Navigation Tabs

Create a tab layout:
app/(tabs)/_layout.tsx
3

Explore Deep Linking

Test deep links:

Learn More

File-Based Routing

Learn all routing conventions

Navigation

Master navigation patterns

Dynamic Routes

Work with dynamic parameters

Layouts

Share UI across routes