void-expo-router-pattern

Implements file-based routing in Expo apps using expo-router layouts, groups, and typed routes.

Updated May 29, 2026
One-click install
npx skills add https://github.com/voidcorp-core/void-harness --skill void-expo-router-pattern-voidcorp-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: void-expo-router-pattern
Source: https://github.com/voidcorp-core/void-harness/tree/main/packages/cli/core-assets/packs/pack-mobile/skills/void-expo-router-pattern
Command: npx skills add https://github.com/voidcorp-core/void-harness --skill void-expo-router-pattern-voidcorp-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Structuring navigation in an Expo app is error-prone: developers mix React Navigation with expo-router, dump all logic into one root layout, and hardcode path strings that break silently. This Skill provides the file-based routing conventions for expo-router so screens, tabs, modals, and auth flows follow one consistent structure that mirrors Next.js App Router. ## Core Features & Use Cases - File-based route structure: Defines the app/ directory archetype with (tabs)/, (modal)/, and (auth)/ groups, per-group _layout.tsx files, dynamic segments like [id].tsx, and +not-found.tsx. - Navigation primitives and typed routes: Covers <Link> versus router.push, useLocalSearchParams for dynamic segments, and enabling experiments.typedRoutes for build-time path checking. - Deep links, modals, and auth flow: Explains automatic deep-link configuration via scheme, the modal-as-route versus modal-as-state decision, and redirecting unauthenticated users with <Redirect> in the root layout. - Use Case: When adding a contacts screen with a detail page to an Expo app in a monorepo, use this Skill to place contacts/index.tsx and contacts/[id].tsx under (tabs)/, wire the tab layout, and navigate with typed <Link> components. ## Quick Start Ask the agent to add a new screen with tab navigation and a dynamic detail route to your Expo app using expo-router conventions.

Frequently Asked Questions about void-expo-router-pattern

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up file-based routing in an Expo app with expo-router?

Create an app/ directory where each file becomes a route: index.tsx maps to /, folders create nested paths, and [id].tsx creates dynamic segments. Add a root _layout.tsx that renders a Stack navigator and wrap screens in providers.

How do I create tabs and modals with expo-router?

Use route groups: a (tabs)/ folder with a _layout.tsx rendering <Tabs> configures the tab bar, while a (modal)/ group with presentation: 'modal' in its layout slides screens up. Groups organize routes without affecting the URL.

expo-router vs React Navigation: which should I use?

expo-router builds on React Navigation but adds file-based routing, automatic deep links, and typed routes. Do not mix both APIs directly since they conflict; pick expo-router if you want the Next.js App Router mental model.

Does expo-router support deep links and typed routes?

Yes. Deep links are configured automatically from the file structure once you set scheme in app.config.ts. Enable experiments.typedRoutes to type-check <Link> hrefs and route params at build time.

When should a modal be a route versus local state in expo-router?

Make it a route in a (modal)/ group when the screen should be shareable, deep-linkable, or back-navigable, such as a new-contact form. Use local useState with a Modal component for transient UI like confirmation dialogs.