Type Declaration
Props
Application basename for when you can’t deploy to the root of the domain, but a subdirectory.
Route components describing your route configuration. Typically contains a
<Routes> component with nested <Route> elements.Initial entries in the in-memory history stack. Each entry can be a string (pathname) or a partial Location object.
Index of
initialEntries the application should initialize to. Defaults to the last entry.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, Link and Form navigations 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.
Example
Testing
Navigating Between Entries
Use Cases
- Testing: Useful for testing components that use routing without a browser
- React Native: For apps that don’t have a browser history stack
- Server-side rendering: For controlling the initial location on the server
- Embedding: When you need multiple isolated routing contexts in a single app