React Router is easier to understand as one system than as a catalog of components and hooks. The system connects a URL to a hierarchy of matched routes. That hierarchy decides which nested UI renders. In Data and Framework modes, the same matches also decide which data loads and which mutations run. Link, Outlet, useNavigate, loaders and actions are all parts of that one pipeline.
The core model: three jobs, not dozens of APIs
The v6 Main Concepts guide describes the router as doing three jobs:
As an Amazon Associate I earn from qualifying purchases.
- Subscribing to and manipulating the history stack.
- Matching the URL to your routes.
- Rendering a nested UI from the route matches.
Navigation changes the location. The router matches that location against your route definitions. It then renders the matched routes as a hierarchy. Every API you meet sits on one of those steps. Link and useNavigate change the location. useLocation reads it. Route definitions are what the matcher compares against. Outlet is where nesting becomes visible.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteOne caveat on that source: the page is labeled v6.30.3 and says it needs updating for the v6.4 data APIs. Use it for the enduring history, matching and nested-rendering model. Do not use it as the authority on current Data or Framework behavior.
#1 Best Overall
Nested routes: the URL maps to a stack of UI
A matched URL does not select a single component. It selects a chain of routes. A parent route renders shared UI, such as a sidebar or header. It places an <Outlet> where the matched child should appear. The current Declarative routing docs show this setup: <BrowserRouter> wraps <Routes>, and each <Route> couples a URL segment to a UI element.
- Nested routes: child paths extend the parent path, and the child renders inside the parent.
- Layout routes: a parent that contributes UI and an
Outletwithout adding a URL segment of its own. - Index routes: the child that renders in the parent’s
Outletwhen the URL matches the parent exactly.
Once you see the URL as a route hierarchy, the questions get simpler. “Why is this sidebar still here?” has the answer “the parent is still matched.” “Why is nothing rendering in this area?” has the answer “the parent has no Outlet, or no child matched.”
Three modes, one system
The official mode guide calls React Router a multi-strategy router with three modes. The modes are additive. Each step adds features and gives you less architectural control. The choice depends on how much of the application architecture you want React Router to provide.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
| Mode | What it adds | What you keep control of |
|---|---|---|
| Declarative | URL-to-component matching, navigation and active states (Link, useNavigate, useLocation). Routes are expressed as rendered <Routes>. |
Almost everything else, including your own data abstractions. |
| Data | Route configuration moved outside React rendering, plus loaders, actions, fetchers and pending states. | Bundling, data handling and server abstractions. |
| Framework | A Vite plugin wrapping Data mode, adding the Route Module API, type-safe route helpers, automatic code splitting, and SPA, SSR and static-rendering strategies. | Less than in the other modes, because React Router supplies more of the framework. |
The same mode page also includes an availability table. Not every API exists in every mode, so check it before you copy an example from another tutorial. A loader snippet will not work in a Declarative <Routes> setup.
Rank #3
How to choose
- Pick Declarative if you want the simplest URL-to-UI mapping, or you already have a data layer you trust.
- Pick Data if you want routes to own data loading and mutation, but you want to keep control of bundling and servers.
- Pick Framework if you want React Router to provide much of the application framework, including rendering strategy.
Reads and writes: how data fits the route hierarchy
In Data and Framework modes the matched routes also describe the data a page needs. The sequence is:
- The URL matches a hierarchy of routes.
- Each matched route can supply its data through a loader.
- The nested UI renders with that data.
- A user submission goes to a route action, which changes the data.
- After the action completes, React Router revalidates loader data by default, so the UI reflects the change.
The Data mode actions docs describe the default revalidation behavior. They also cover fetchers. A fetcher submits to an action without navigating and without adding a history entry. Use one for in-place interactions, such as a like button or an inline edit. A normal form submission navigates.
Rank #4
Framework mode: route modules
In Framework mode, each route’s file is a route module. The docs list automatic code splitting, data loading, actions, revalidation and error boundaries among what route modules provide. The data loading docs make the server/browser split explicit. A loader runs on the server during server rendering, or at build time for pre-rendering. A clientLoader runs in the browser.
Recommended Free Tools
The mental model is unchanged. A route still matches, nests and loads data. The route module is simply the file where that route’s pieces live.
Best Value
Setup does not lock in hosting
The Quick Start describes Framework mode output as a server request handler plus static browser assets. You can run the handler inside a custom server. You can also use React Router as a single-page app with no server. The docs do not tie you to one hosting platform. They also do not say how much work any particular deployment will take, so check that against your own target.
Debugging with the model
- Wrong page or blank page: check the match. Which routes in the hierarchy matched the current URL?
- Child missing inside a layout: check that the parent renders an
Outlet. - Stale data after a change: check that the change went through an action, since revalidation follows a completed action.
- API not found or not working: check your mode. The feature may not exist there.
No React Router version is assumed here. The Data and Framework behavior described comes from the current docs. If your project is on an older v6 release, check its version-specific documentation before adopting these APIs.
The Bottom Line
Treat React Router as one pipeline: the URL becomes route matches, matches become nested UI, and in Data and Framework modes matches also drive loaders, actions and revalidation. Your mode decides how much of that pipeline you write yourself.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




