expo-router
Installation
SKILL.md
Expo Router
Overview
File-based routing for React Native using Expo Router 6.x. Maps file system structure in the app/ directory to navigation screens. Supports Stack and Tab navigators, route groups, dynamic parameters, and nested layouts.
Install: Included with Expo SDK 54+. Ensure expo-router is in dependencies.
Workflows
Setting up routing:
- Create
app/_layout.tsxas root layout (providers, global chrome) - Create route group directories:
app/(demo)/,app/(auth)/ - Add
_layout.tsxin each group for group-specific navigation - Add
index.tsxfor default screens - Add
[param].tsxfor dynamic routes - Add
+not-found.tsxfor 404 handling