Expo Router
π I'm Simon
- π‘ MΓΌnster, Germany
- π© π§ π¦
- π’ Techfluencer
- ποΈ Sports addict
What this workshop is
- Learn how to use the Expo Router
- Excercises
- Write Code
What it's not
- A deep dive into React Native
- Covering all edge-cases
- Endless slides
Prerequisites
- Check out GitHub Repository
- Install Dependencies in
src/basic-appwithnpm install - Start Expo with
npx expo
Schedule
- π€ Intro
- π Expo Router Basics
- ποΈ Stack, Tabs, Drawer
- πͺ Params & Hooks
- βοΈ Break
- π₯ Expo Web
- π Styling
- π Deep Linking
- π Lunch
- π Case Study: Auth
- πββοΈ Wrap Up
Emoji
- Cody Cat π± "Write Code"
- Betty Beaver 𦫠"Bonus Tasks"
- Olivia Owl π¦ "Good to know"
- Lilly Link π "Useful docs"
Are you ready?
Routing with Expo Router
Expo Router Basics
- Every file inside
appbecomes a page - Layouts (
_layout) define your page structure - Create Expo Router apps with the CLI:
npx create-expo-app myapp -t tabs
Exercise 1: Stack
- Copy the
1-1/_layout.tsxto yourapp/folder
Exercise 2: Tabs
- Create a
tabsfolder insideapp/ - Copy the
1-2/_layout.tsxto yourapp/tabsfolder
Exercise 3: Drawer
- Create a
drawerfolder insideapp/ - Copy the
1-3/_layout.tsxto yourapp/drawerfolder
Exercise 4: Navigation Params
- Copy the
1-4/list.tsxand1-4/[id].tsxto yourapp/tabsfolder
Exercise 5: Nested Layout & Hooks
- Create a
listfolder insideapp/tabs - Copy the
1-5/_layout_.tsxto yourapp/tabs/listfolder
Coffee Break
Universal Apps with Expo Router
Exercise 1: Web Layout
- Copy the
2-1/_layout.tsxto yourapp/drawerfolder
Exercise 2: Platform-specific Extensions
- Copy the
2-2/page.web.tsx.tsxto yourcomponents/homefolder
Alternative Approach
- Solito + Next.js
Exercise 3: CSS
- Copy the
2-3/page.web.tsxand2-3/page.cssto yourcomponents/homefolder
More CSS Styling?
- Nativewind (Tailwind)
- Tamagui
Exercise 4: HTML Head
- Copy the
2-4/+html.tsxand2-4/[...unmatched].tsxto yourapp/folder
Exercise 5: Static Export
- Copy the
2-5/[id].tsxΒ to yourapp/drawer/listfolder
Exercise 6: Deep Links
Deep Linking
- Android: App Links
- iOS: Universal Links
- Also possible: Apple Handoff
Lunch Break
Case Study: Auth
- Login/Register
- Protected Routes (Tabs)
Exercise 1: Login Stack
- Copy the
3-1/_layout_.tsxto yourapp/folder
Exercise 2: Protected Routes
- Copy the
3-2/_layout_.tsxto yourapp/folder - Copy the
3-2/(authenticated).tsxto yourapp/folder
Exercise 3: Nested Tabs
- Copy the
3-3/(tabs)Β folder to yourapp/(authenticated)folder
Exercise 4: Additional Drawer
- Copy the
3-4/_layout_.tsxto yourapp/(authenticated)folder

Wrap Up
- What did you learn?
- Feedback π
- https://galaxies.dev/workshop-feedback
Copy of Expo Router
By Simon Grimm
Copy of Expo Router
- 50