Routes
On this page

Routes

Summary

Reference Documentation ↗

Renders a branch of <Route>s that best matches the current location. Note that these routes do not participate in data loading, action, code splitting, or any other route module features.

import { Route, Routes } from "react-router";

<Routes>
  <Route index element={<StepOne />} />
  <Route path="step-2" element={<StepTwo />} />
  <Route path="step-3" element={<StepThree />}>
</Routes>

Signature

function Routes({
  children,
  location,
}: RoutesProps): React.ReactElement | null

Props

children

Nested Route elements

location

The Location to match against. Defaults to the current location.

Docs and examples CC 4.0
Edit