React Router API Reference
    Preparing search index...

    Function Routes

    • 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.

      Parameters

      • props: RoutesProps

        Props

        • Optionalchildren?: ReactNode

          Nested Route elements

        • Optionallocation?: string | Partial<Location<any>>

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

      Returns null | ReactElement<any, string | JSXElementConstructor<any>>

      React element for the rendered routes or null if no route matches

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

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

      @public