LibraryActive

React Router

React Router is a multi-strategy React router library with framework, data, and declarative modes.

Open source page ↗

Field note

What it does

React Router provides framework, data, and declarative routing modes with data loading, actions, and navigation APIs.

Capabilities

Available capabilities

Tags

Tags

Ways to use it

Ways to use it

npm

javascript / @react-router/dev

npm

javascript / react-router

npm

typescript / react-router-dom

npm

Not filed / @react-router/dev

npm

Not filed / Not filed

npm

JavaScript / react-router

npm

javascript / react-router

npm

javascript / Not filed

Product features

Product features

Await

Await component for rendering resolved data from promises.

Data Mode

Data routing mode using route objects with data loading and actions.

Declarative Mode

Declarative routing mode with routing, navigating, and URL values.

Form

Form component for declarative form submission.

Form Component

A progressively enhanced HTML form component.

Framework Features

Adopt new framework features in an existing React Router app.

Framework Mode

Full-stack framework mode with routing, route modules, and rendering strategies.

Future Flags

future.v8_middleware

future.v8_passThroughRequests

future.v8_splitRouteModules

future.v8_trailingSlashAwareDataRequests

future.v8_viteEnvironmentApi

Link

Link component for client-side navigation.

Link

A component for navigating to another route.

Loader

Data loading for routes.

Meta

Component for rendering document metadata in React Router routes.

meta / matches data Values

Middleware

Future flag v8_middleware for middleware support.

Minimum Versions

Multi-strategy Router

A multi-strategy router you can deploy anywhere.

Navigate component

A component that changes the current location when rendered.

NavLink

A component for navigation links with active and pending states.

NavLink component

A Link variant that knows its active state.

Non-breaking Upgrade

Upgrading from v7 to v8 is a non-breaking upgrade.

Open Governance

Developed via an Open Governance model with community proposals.

Other Breaking Changes

Outlet

Outlet component for rendering child routes.

Outlet component

Renders the matched child route.

Pass Through Requests

Future flag v8_passThroughRequests for passing through requests.

prefetch

Controls prefetching behavior for links.

react-router-dom

React Server Components

Unstable RSC support with RSCHydratedRouter and RSCStaticRouter.

Route Module Type Safety

Type safety for route modules.

Route Modules

Migrate routes to route modules in framework mode.

RouterProvider

A data router provider component.

Split Route Modules

Future flag v8_splitRouteModules for splitting route modules.

Trailing Slash Aware Data Requests

Future flag v8_trailingSlashAwareDataRequests for trailing slash aware data requests.

Update to latest v7.x

Upgrading from v7

useLoaderData

Hook for accessing route loader data.

useLoaderData hook

A hook that returns route loader data.

useNavigate hook

A hook for programmatic navigation.

viewTransition

Enables view transitions on navigation.

View Transitions

Support for view transitions including useViewTransitionState.

Vite Environment API

Future flag v8_viteEnvironmentApi for Vite environment API support.

Vite Plugin

Install the Vite plugin for framework adoption.