react-router-v7

Guide React Router v7 data-driven routing with loaders, actions, and nested routes.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/pau-vega/react-router-drizzle --skill react-router-v7-pau-vega
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-router-v7
Source: https://github.com/pau-vega/react-router-drizzle/tree/main/.agents/skills/react-router-v7
Command: npx skills add https://github.com/pau-vega/react-router-drizzle --skill react-router-v7-pau-vega

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

React Router v7 pattern guide for building resilient, data-driven routes with loaders, actions, and navigation controls.

Core Features & Use Cases

  • Provides guidance on nested routes, dynamic segments, loaders, actions, and fetchers.
  • Helps implement protected routes, error boundaries, and optimized navigation.
  • Real-world scenario: structuring an admin dashboard with data fetching and mutations.

Quick Start

Identify routing needs and apply v7 data-loading patterns to structure routes, loaders, and actions in your app.

Frequently Asked Questions about react-router-v7

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

FAQPage Schema
How do I structure loaders and actions for React Router v7?

Structure loaders and actions in React Router v7 by applying data-mode patterns to fetch data and handle mutations directly within route definitions. This integrates data fetching with navigation controls for resilient single-page applications.

What is the difference between framework mode and data mode in React Router?

Framework mode and data mode in React Router represent different architectural patterns for building applications. Data mode focuses on integrating data-loading patterns into existing SPAs, while framework mode provides a more opinionated structure for full-stack routing.

How do I implement protected routes and error boundaries in a React Router SPA?

Implement protected routes and error boundaries in a React Router SPA by utilizing navigation controls and error handling patterns. This ensures guarded navigation and manages unexpected UI failures within your nested route structures.

Can I use fetchers for mutations without triggering a navigation event in React Router?

Yes, fetchers in React Router allow you to perform mutations and data submissions without causing a full navigation event. They interact with route actions independently, enabling background data updates and form submissions.

What is the best way to design an admin dashboard with nested routes and dynamic segments?

Design an admin dashboard using nested routes and dynamic segments to map hierarchical UI structures to URL paths. Apply React Router v7 data-fetching patterns to load context-specific data for each dynamic segment efficiently.

Why does my React Router v7 data loader not execute on navigation?

If a React Router v7 data loader is not executing on navigation, it typically indicates a misconfiguration in the route definition or an incorrect application of data-mode patterns. Ensure your route hierarchy correctly maps to the component tree.