RouterProvider
On this page

RouterProvider

Summary

Reference Documentation ↗

Initializes a data router, subscribes to its changes, and renders the matching components. Should typically be at the top of an app's element tree.

import {
  RouterProvider,
  createBrowserRouter,
} from "react-router";
import { createRoot } from "react-dom/client";
let router = createBrowserRouter();
createRoot(document.getElementById("root")).render(
  <RouterProvider router={router} />
);

Props

flushSync

No documentation

router

No documentation

Docs and examples CC 4.0