Props
Optionalbasename?: stringThe base path for the application. This is prepended to all locations
Optionalchildren?: ReactNodeNested Route elements describing the route tree
The location to match against. Defaults to the current location. This can be a string or a Location object.
OptionalnavigationType?: NavigationTypeThe type of navigation that triggered this location change.
Defaults to NavigationType.Pop.
The navigator to use for navigation. This is usually a history object or a custom navigator that implements the Navigator interface.
Optionalstatic?: booleanWhether this router is static or not (used for SSR). If true, the router
will not be reactive to location changes.
Optionalunstable_useTransitions?: booleanControl whether router state updates are internally wrapped in
React.startTransition.
undefined, all router state updates are wrapped in
React.startTransitiontrue, Link and Form navigations will be wrapped
in React.startTransition and all router state updates are wrapped in
React.startTransitionfalse, the router will not leverage React.startTransition
on any navigations or state changes.For more information, please see the docs.
React element for the rendered router or null if the location does
not match the props.basename
Provides location context for the rest of the app.
Note: You usually won't render a
<Router>directly. Instead, you'll render a router that is more specific to your environment such as a BrowserRouter in web browsers or a ServerRouter for server rendering.