---
name: react-router-data-mode
description: Build React applications using React Router's data mode with createBrowserRouter and RouterProvider. Use when working with route objects, loaders, actions, Form, useFetcher, or pending/optimistic UI without the Vite plugin.
license: MIT
---
# React Router Data Mode
Data mode uses `createBrowserRouter` and `RouterProvider` to enable data loading, actions, and pending UI without the framework's Vite plugin. This is ideal for existing React applications that want to add data loading and mutation capabilities.
## When to Apply
- Using `createBrowserRouter` with route objects
- Loading data with `loader` property on routes
- Handling mutations with `action` property
- Navigating with ``, ``, `
// ❌ Wrong - don't manually handle search params