Most React applications have more than one screen, and users expect to move between them with the URL updating, the back button working, and links being shareable — all without a full page reload. React Router is the standard library that provides this client-side routing, mapping URLs to components and handling navigation entirely in the browser for the instant, app-like feel of a single-page application.
React Router v7 is a significant evolution that unifies the library with data-loading patterns from Remix. You can use it as a simple routing library or adopt its data APIs — route loaders that fetch before rendering and actions that handle mutations — and it works in both a library mode and a framework mode. The core routing concepts, however, remain approachable.
This lesson covers the fundamentals: defining routes, navigating with links and programmatically, reading URL parameters, nesting routes with shared layouts, and an introduction to the data APIs. Mastering routing is essential because it is the skeleton on which multi-page React applications are built.