# React Router — card for AI agents

Declarative routing library for building single-page React applications.

Category: Web frameworks · npm package `react-router-dom` · latest version 7.18.5 (checked 2026-11-01)
Install: `npm install react-router-dom`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## React Router
- Follow the install guide that matches the project's mode: `reactrouter.com/start/framework/installation` for framework use, `reactrouter.com/start/library/installation` for library use.
- On v8, target Node 22+, Vite 7+ and React 19+. The package is ESM-only, so write ESM imports.
- For a v7 project, upgrade using the guide at `reactrouter.com/upgrading/v7`.
- To add framework features to an existing React Router app, follow the site's "Adopt Framework Features" guide.
- When the installed major is older, read the matching docs: `reactrouter.com/v7`, `reactrouter.com/v6` or `v5.reactrouter.com`.
- For server runtimes, pick from the packages the README lists: `@react-router/node`, `@react-router/serve`, `@react-router/express`, `@react-router/architect`, `@react-router/cloudflare`.

## What it is
- React Router describes itself as "a multi-strategy router for React." The GitHub description is shorter: "Declarative routing for React." The README links two Getting Started guides, one for framework use and one for library use. The GitHub repository was created on 2014-05-16 and is MIT licensed.
- The core `react-router` package shares one repository with eight related packages. These include packages named for Node, Express, Architect and Cloudflare. The latest GitHub release is `react-router@8.4.0`, published 2026-09-15. The releases page sends readers to the changelog for release notes.
- The website sorts visitors into four cards: new users, v7 users moving to v8, people adding framework features to an existing React Router app, and people who are stuck. The first three cards link to docs. The "I'm stuck" card points to GitHub discussions for help.

## Caveats
- v8 sets a high floor: The website lists the v8 baseline as Node 22+, Vite 7+, React 19+ and ESM-only. The maintainers say the higher baselines let them "keep the core of React Router simple."
- Older docs live elsewhere: The README links separate docs for v7 and v6 under reactrouter.com. Docs for v5 are on their own subdomain, `v5.reactrouter.com`.

## Numbers (AgentGid data)
- Gid Score: 87.2 (#20 of all tools, 3 of 76 in its category)
- Used in 292 public projects set up for AI coding agents (4.7%)
- Downloads last week: 59,054,563 (as of 2026-11-24), +30.8% over 4 weeks
- GitHub stars: 56,652 (as of 2026-11-24)
- Last push: 2026-11-23

## Often used with
Vite 90.4%, React 99.0%, Lucide React 65.4%, Tailwind CSS 79.5%, date-fns 47.3%, Testing Library 44.5%

## Checked alternatives (same job)
- TanStack Router: https://agentgid.com/tools/tanstack-react-router/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/react-router-dom/
- Homepage: https://github.com/remix-run/react-router#readme
- Repository: https://github.com/remix-run/react-router
- Source: https://github.com/remix-run/react-router#readme
- Source: https://github.com/remix-run/react-router
- Source: https://github.com/remix-run/react-router/releases
- Source: https://reactrouter.com

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
