Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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;
errors: RouteData | null;
fetchers: Map<string, Fetcher>;
historyAction: HistoryAction;
initialized: boolean;
loaderData: RouteData;
location: Location;
navigation: Navigation;
preventScrollReset: boolean;
restoreScrollPosition: number | false | null;
revalidation: RevalidationState;
}

§Properties

§
actionData: RouteData | null
[src]

Data from the action for the current matches

§
errors: RouteData | null
[src]

Errors caught from loaders for the current matches

§
fetchers: Map<string, Fetcher>
[src]

Map of current fetchers

§
historyAction: HistoryAction
[src]

The action of the most recent navigation

§
initialized: boolean
[src]

Tracks whether we've completed our initial data load

§
loaderData: RouteData
[src]

Data from the loaders for the current matches

§
location: Location
[src]

The current location reflected by the router

§

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
§

Tracks any in-progress revalidations