react-router-data-mode
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
createBrowserRouterwith route objects - Loading data with
loaderproperty on routes - Handling mutations with
actionproperty - Navigating with
<Link>,<NavLink>,<Form>,redirect, anduseNavigate - Implementing pending/loading UI states with
useNavigation - Using
useFetcherfor mutations without navigation
References
Load the relevant reference for detailed guidance on the specific API/concept:
More from remix-run/agent-skills
react-router-framework-mode
Build full-stack React applications using React Router's framework mode. Use when configuring routes, working with loaders and actions, handling forms, handling navigation, pending/optimistic UI, error boundaries, or working with react-router.config.ts or other react router conventions.
2.1Kreact-router-declarative-mode
Build React applications using React Router's declarative mode with BrowserRouter. Use when configuring routes with JSX, navigating with Link/NavLink, or reading URL params and search params without data loaders or actions.
337