Create a RouteAdapter from a shared history controller.
Route matching is path-based, so this adapter surfaces location.path (query/hash are intentionally omitted from Route context matching).
location.path
Adapter navigation methods call history with replaceSearch: true so a path-only navigation does not accidentally retain a previous query string.
replaceSearch: true
Example:
const history = createMemoryHistory("/app/books/42?tab=summary");const adapter = createRouteAdapterFromHistory(history);adapter.push?.("/app/books/99");// history.location.path === "/app/books/99"// history.location.search === undefined Copy
const history = createMemoryHistory("/app/books/42?tab=summary");const adapter = createRouteAdapterFromHistory(history);adapter.push?.("/app/books/99");// history.location.path === "/app/books/99"// history.location.search === undefined
Create a RouteAdapter from a shared history controller.
Route matching is path-based, so this adapter surfaces
location.path(query/hash are intentionally omitted from Route context matching).Adapter navigation methods call history with
replaceSearch: trueso a path-only navigation does not accidentally retain a previous query string.Example: