React Router is a routing library for React, the JavaScript library for building user interfaces. A router maps each URL of a web app to the component that displays it, so that the app can switch pages in the browser without loading a new HTML document from the server. The site is copyrighted by Shopify, Inc., and the project is developed under an Open Governance model.
It works in three modes, and each adds features to the previous one. Declarative mode matches URLs to components and handles navigation with APIs such as <Link>, useNavigate and useLocation. Data mode moves the route configuration outside React rendering and adds data loading, actions (form submissions) and pending states through loader, action and useFetcher. Framework mode wraps data mode with a Vite plugin and adds type-safe routes, automatic code splitting, and single-page, server-side or static rendering. Version 8 needs Node 22+, Vite 7+ and React 19+.
React Router is free and open source under the MIT license and is installed from npm.