react-router-declarative-mode
React Router Declarative Mode
Declarative mode is React Router's simplest mode using <BrowserRouter>, <Routes>, and <Route> for basic client-side routing without data loading features like loaders or actions.
When to Apply
- Using
<BrowserRouter>for routing - Configuring routes with
<Routes>and<Route> - Navigating with
<Link>,<NavLink>, oruseNavigate - Reading URL params with
useParams - Working with search params using
useSearchParams - Accessing location with
useLocation
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-data-mode
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.
428