HistoryRouter
unstable_HistoryRouter
Declarative
Warning
This API is experimental and subject to breaking changes in minor/patch releases. Please use with caution and pay very close attention to release notes for relevant changes.
Summary
A declarative <Router> that accepts a pre-instantiated
history object.
It's important to note that using your own history object is highly discouraged
and may add two versions of the history library to your bundles unless you use
the same version of the history library that React Router uses internally.
Signature
function HistoryRouter({
basename,
children,
history,
useTransitions,
}: HistoryRouterProps)Props
basename
Application basename
children
<Route> components describing your route configuration
history
A History implementation for use by the router
useTransitions
Control whether router state updates are internally wrapped in
React.startTransition.
- When left
undefined, all router state updates are wrapped inReact.startTransition - When set to
true,LinkandFormnavigations will be wrapped inReact.startTransitionand all router state updates are wrapped inReact.startTransition - When set to
false, the router will not leverageReact.startTransitionon any navigations or state changes.
For more information, please see the docs.