React Router Data Mode
Independent PiSkill directory guide. The original skill remains hosted by React Router Agent Skills.
What is React Router Data Mode?
Guides React Router data-mode applications using createBrowserRouter and RouterProvider, including route objects, loaders, actions, forms, pending UI, and optimistic updates.
What does React Router Data Mode do?
React Router Data Mode is a React Router Agent Skill for applications that use `createBrowserRouter` and `RouterProvider` to add route-aware data loading and mutations without adopting the framework's Vite plugin. It covers loaders, actions, forms, fetchers, redirects and pending or optimistic UI.
Who is React Router Data Mode best for?
- Existing React apps adding router-managed data loading
- Teams using route objects instead of JSX-only routes
- Applications handling form mutations through React Router
- Developers implementing pending and optimistic navigation states
Common use cases
- Load route data with loaders
- Handle mutations with actions and Form
- Use `useFetcher` for non-navigation mutations
- Build pending or optimistic UI with `useNavigation`
How does React Router Data Mode work?
The skill structures routes as route objects under `createBrowserRouter`, uses loaders for read operations and actions for mutations, and applies React Router navigation primitives for transitions and redirects. It also covers pending UI, fetcher workflows and server-rendering considerations for Data Mode.
Key benefits
- Adds data loading without requiring full Framework Mode
- Keeps mutations aligned with route behavior
- Supports pending and optimistic UI
- Useful for existing React applications
Things to know
- The source repository is archived and read-only, so current React Router docs should be checked for future API changes
- Data Mode has more concepts than simple Declarative Mode
- Application authentication and data-access rules still need project-specific design
Compatible tools
Frequently asked questions
What is React Router Data Mode?
When should I use Data Mode instead of Declarative Mode?
Related skills
React Router Framework Mode
Provides current patterns for full-stack React Router framework-mode applications, including routing, loaders, actions, forms, sessions, middleware, error handling, and rendering strategies.
React Router Declarative Mode
Guides declarative React Router applications using BrowserRouter, JSX route configuration, Link and NavLink navigation, and URL parameter handling without data-mode APIs.
React Best Practices
Applies Vercel Engineering's React and Next.js performance guidance when writing, reviewing, or refactoring components, data fetching, bundles, rendering, and server-side code.
New Terraform Provider
Scaffolds a new Terraform provider using the Terraform Plugin Framework, including Go module setup, provider server entrypoint, schema, configuration, build, and tests.
Cloudflare Durable Objects
Designs stateful Cloudflare applications with Durable Objects, covering storage, consistency, alarms, WebSockets, migrations, concurrency, and production reliability patterns.
Cloudflare Sandbox Next
Builds isolated code-execution and development workflows with Cloudflare's next-generation Sandbox APIs, including lifecycle, files, commands, and integration boundaries.