RouterState
State maintained internally by the router. During a navigation, all states reflect the the "old" location unless otherwise noted.
interface RouterState {
actionData: RouteData | null;
blockers: Map<string, Blocker>;
errors: RouteData | null;
fetchers: Map<string, Fetcher>;
historyAction: HistoryAction;
initialized: boolean;
loaderData: RouteData;
location: Location;
matches: AgnosticDataRouteMatch[];
navigation: Navigation;
preventScrollReset: boolean;
restoreScrollPosition: number | false | null;
revalidation: RevalidationState;
}§Properties
§
historyAction: HistoryAction
[src]The action of the most recent navigation
§
matches: AgnosticDataRouteMatch[]
[src]The current set of route matches
§
preventScrollReset: boolean
[src]Indicate whether this navigation should skip resetting the scroll position if we are unable to restore the scroll position
§
restoreScrollPosition: number | false | null
[src]Current scroll position we should start at for a new view
- number -> scroll position to restore to
- false -> do not restore scroll at all (used during submissions)
- null -> don't have a saved position, scroll to hash or top of page
§
revalidation: RevalidationState
[src]Tracks any in-progress revalidations