Generate Expo Router Navigation Structure

mobile
TypeScript
scaffolding
zen
Remix

Create a complete file-based navigation setup with tabs, stacks, modals, and protected routes.

12/8/2025

Prompt

Generate a complete Expo Router navigation structure for [APP_NAME] with the following specifications:

Requirements

  • App name: [APP_NAME]
  • Tab screens: [TAB_1], [TAB_2], [TAB_3]
  • Modal screens: [MODAL_1], [MODAL_2]
  • Dynamic routes: [DYNAMIC_ROUTE_PATTERN]
  • Protected routes: [LIST_PROTECTED_SCREENS]
  • Deep linking scheme: [SCHEME_NAME]
  • Icon library: [ICON_LIBRARY] (default: @expo/vector-icons)

Deliverables

Generate the complete file structure and implementation:

app/_layout.tsx - Root Stack layout with modal configuration app/(tabs)/_layout.tsx - Tab navigator with icons and titles app/(tabs)/[TAB_SCREENS].tsx - Individual tab screen components app/(modals)/[MODAL_SCREENS].tsx - Modal screen components app/[DYNAMIC_ROUTES].tsx - Dynamic route handlers with params app.json - Deep linking configuration types/navigation.ts - TypeScript navigation types

Each file must include:

  • Full type safety with TypeScript
  • Icon configuration for tabs using [ICON_LIBRARY]
  • Protected route middleware with redirect logic
  • Programmatic navigation examples (router.push, router.replace, router.back)
  • Dynamic route param handling with useLocalSearchParams
  • Modal presentation configuration
  • Deep linking scheme setup

Output complete, production-ready navigation code for all files.

Tags

expo
react-native
routing
navigation

Tested Models

gpt-4
claude-3-5-sonnet

Comments (0)

Sign in to leave a comment

Sign In