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
ifor iOS simulator - Press
afor Android emulator - Press
wfor 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 theapp directory becomes a route:
index.tsx→/(root path)about.tsx→/aboutprofile/[id].tsx→/profile/:id(dynamic segment)
Navigation Methods
You used two ways to navigate:<Link>component - Declarative navigation:
routerobject - Imperative navigation:
Dynamic Parameters
The[id].tsx file creates a dynamic route:
/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