lukedj78/dev-flow / rn-expo-router
rn-expo-router
VerifiedUse when working with navigation in an Expo + React Native app: adding routes, building tab/stack/drawer layouts, modal routes, dynamic segments (e.g. /profile/[id]), typed routes, deep linking, search params. Triggers on: "add a route", "wire up tabs", "open as modal", "set up deep linking", "configure navigation", or whenever an agent is about to touch a file under app/. Not for: styling navigation chrome (rn-styling), animating transitions (rn-animations-gestures, Wave 3), or non-RN web routing.
rn-expo-router — guardrail for navigation in Expo + RN
For the current Expo API and per-version details, verify against the Expo docs / MCP
mcp.expo.dev/expo/skills(see rn-fundamentals → Source of truth).
The 4 rules (non-negotiable)
- Expo Router only. Never
importfrom@react-navigation/*directly — Expo Router wraps and owns it. - File-based: routes live in
app/. The filename IS the URL._layout.tsxfiles define the layout for their directory. - Typed routes ON. In
app.json:"expo": { "experiments": { "typedRoutes": true } }. UseHreftype for navigation, never raw strings. - Layouts contain navigators. Screen files contain only the screen UI. Tab bar / stack header config goes in
_layout.tsx.
Quick decision tree
- "Tabs / Stack / Drawer — which?" →
references/decision-tree.md - "How do I structure routes for an auth-gated section?" →
references/patterns.md(Auth groups) - "Deep linking from notification or URL?" →
references/deep-linking-setup.md - "Show me a real layout" →
references/examples/
Common anti-patterns (NEVER do)
- ❌
import { useNavigation } from '@react-navigation/native'→ useuseRouter()fromexpo-router. - ❌
router.push('/profile/123')as raw string → typed routes:router.push({ pathname: '/profile/[id]', params: { id: '123' } }). - ❌ Defining a
<Tabs.Screen>in a screen file — it goes in the parent_layout.tsx. - ❌ Hardcoded route strings scattered everywhere → use typed routes (
expo-router/typed-routesprovides static checking).
Sources
- Course: codewithbeto.dev/rnCourse — lesson 11 "Navigation Basics" (free) + 1 free Expo Router lesson.
- Official: https://docs.expo.dev/router/introduction/
- Official: https://docs.expo.dev/router/reference/typed-routes/
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 468k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |