#react-router#browserrouter#navigation#jsx#react

React Router Declarative Mode

Independent PiSkill directory guide. The original skill remains hosted by React Router Agent Skills.

What is 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.

What does React Router Declarative Mode do?

React Router Declarative Mode is a React Router Agent Skill for straightforward client-side routing with `BrowserRouter`, JSX routes and navigation hooks. It is intended for applications that need nested routes, links, route parameters and search parameters without router-managed loaders or actions.

Who is React Router Declarative Mode best for?

  • React apps that only need client-side routing
  • Projects using JSX `<Routes>` and `<Route>` configuration
  • Teams working with URL params and search params
  • Developers who do not need React Router data APIs

Common use cases

  • Configure nested JSX routes
  • Navigate with Link, NavLink or `useNavigate`
  • Read dynamic parameters with `useParams`
  • Manage query strings with `useSearchParams`

How does React Router Declarative Mode work?

The skill uses `BrowserRouter` around JSX route definitions and selects the relevant navigation or URL hooks for each task. It deliberately keeps the routing layer simple by excluding loaders and actions that belong to Data or Framework Mode.

Key benefits

  • Simple mental model for client-side routing
  • Covers route configuration and common navigation hooks
  • Useful for smaller or existing React applications
  • Avoids data-router complexity when it is not needed

Things to know

  • The source repository is archived and read-only, so current React Router documentation should be checked for future changes
  • Declarative Mode does not provide route loaders or actions
  • Larger full-stack applications may benefit from Data or Framework Mode

Compatible tools

Claude CodeOpenAI CodexCursorGitHub Copilot

Frequently asked questions

What is React Router Declarative Mode?
It is the simplest React Router mode using BrowserRouter and JSX routes for navigation, URL params and search params without loaders or actions.
When should I choose Data Mode instead?
Choose Data Mode when routes also need built-in loaders, actions, fetchers or pending data states.
← Back to Skills Directory