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-app
withnpm 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
app
becomes 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.tsx
to yourapp/
folder

Exercise 2: Tabs
- Create a
tabs
folder insideapp/
- Copy the
1-2/_layout.tsx
to yourapp/tabs
folder

Exercise 3: Drawer
- Create a
drawer
folder insideapp/
- Copy the
1-3/_layout.tsx
to yourapp/drawer
folder

Exercise 4: Navigation Params
- Copy the
1-4/list.tsx
and1-4/[id].tsx
to yourapp/tabs
folder

Exercise 5: Nested Layout & Hooks
- Create a
list
folder insideapp/tabs
- Copy the
1-5/_layout_.tsx
to yourapp/tabs/list
folder

Coffee Break

Universal Apps with Expo Router

Exercise 1: Web Layout
- Copy the
2-1/_layout.tsx
to yourapp/drawer
folder

Exercise 2: Platform-specific Extensions
- Copy the
2-2/page.web.tsx.tsx
to yourcomponents/home
folder

Alternative Approach
- Solito + Next.js

Exercise 3: CSS
- Copy the
2-3/page.web.tsx
and2-3/page.css
to yourcomponents/home
folder

More CSS Styling?
- Nativewind (Tailwind)
- Tamagui
Exercise 4: HTML Head
- Copy the
2-4/+html.tsx
and2-4/[...unmatched].tsx
to yourapp/
folder

Exercise 5: Static Export
- Copy the
2-5/[id].tsx
Β to yourapp/drawer/list
folder

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_.tsx
to yourapp/
folder

Exercise 2: Protected Routes
- Copy the
3-2/_layout_.tsx
to yourapp/
folder - Copy the
3-2/(authenticated).tsx
to 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_.tsx
to 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
- 36