react-router-framework-mode

Build full-stack React applications using React Router framework mode conventions.

4|Updated Oct 24, 2025
One-click install
npx skills add https://github.com/sethdavis512/iridium --skill react-router-framework-mode-sethdavis512
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: react-router-framework-mode
Source: https://github.com/sethdavis512/iridium/tree/main/.agents/skills/react-router-framework-mode
Command: npx skills add https://github.com/sethdavis512/iridium --skill react-router-framework-mode-sethdavis512

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? React Router v7 framework mode introduces many APIs—loaders, actions, middleware, route modules, rendering strategies—and it is easy to apply outdated or incorrect patterns. This Skill provides authoritative, version-aware guidance so you configure routes, data loading, mutations, and error handling correctly the first time. ## Core Features & Use Cases - Routing & Route Modules: Configure routes in app/routes.ts with nested layouts, dynamic segments, splats, and understand every route module export (loader, action, meta, links, ErrorBoundary, handle). - Data Loading & Mutations: Implement server/client loaders, streaming with Suspense, form handling with <Form> and useFetcher, optimistic UI, and validation error patterns. - Auth, Sessions & Middleware: Set up cookie-based sessions, login/logout flows, protected routes, and middleware with the context API (requires v7.9.0+ with the v8_middleware flag). - Use Case: You are adding a dashboard to a React Router app. Use this Skill to configure nested routes with a shared layout, protect them with auth middleware, load data in a loader, and handle inline mutations with optimistic useFetcher updates. ## Quick Start Use the react-router-framework-mode skill to add a protected dashboard route with a loader and an optimistic favorite button to my React Router app.

Frequently Asked Questions about react-router-framework-mode

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

FAQPage Schema
How do I configure routes in React Router framework mode?▼

Define routes in app/routes.ts using the route, index, layout, and prefix helpers from @react-router/dev/routes. Each route maps a URL pattern to a route module file, and child routes render through the parent's Outlet component.

How do I handle form submissions in React Router v7?▼

Use <Form method="post"> for mutations that navigate, and useFetcher for inline mutations like likes or ratings that should not navigate. For search forms, use <Form method="get"> which automatically serializes inputs into URL search params.

Does React Router support middleware?▼

Middleware requires React Router 7.9.0 or later and the v8_middleware future flag enabled in react-router.config.ts. Export a middleware array from a route module to run code before and after loaders, and share data via the context API.

What is the difference between loader and clientLoader in React Router?▼

A loader runs on the server during SSR and data requests, while clientLoader runs in the browser and can call APIs directly or augment server data. Set clientLoader.hydrate = true to run it during initial page hydration with a HydrateFallback.

How do I implement authentication with sessions in React Router?▼

Use createCookieSessionStorage to build a sessions.server module with getSession, commitSession, and destroySession helpers. Validate credentials in a login action, store the userId in the session, and protect routes with middleware or loader checks that redirect to /login.

Why is my React Router meta function data parameter deprecated?▼

The data parameter in the meta export is deprecated in favor of loaderData. Update your meta function signature to use Route.MetaArgs and read values from loaderData instead of data.