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

§Classes

AbortedDeferredError
DeferredData
ErrorResponse

§Enums

ResultType

§Variables

defer
immutableRouteKeys
joinPaths
json

This is a shortcut for creating application/json responses. Converts data to JSON and sets the Content-Type header.

normalizeHash
normalizePathname
normalizeSearch
redirect

A redirect response. Sets the status code and the Location header. Defaults to "302 Found".

§Functions

convertRoutesToDataRoutes
generatePath

Returns a path with params interpolated.

getPathContributingMatches
getToPathname
isRouteErrorResponse

Check if the given error is an ErrorResponse generated from a 4xx/5xx Response thrown from an action/loader

matchPath

Performs pattern matching on a URL pathname and returns information about the match.

matchRoutes

Matches the given routes to a location and returns the match data.

resolvePath

Returns a resolved path object relative to the given pathname.

resolveTo
stripBasename

§Interfaces

ActionFunction

Route action function signature

ActionFunctionArgs

Arguments passed to action functions

AgnosticDataRouteMatch
AgnosticRouteMatch

A RouteMatch contains info about how a route matched a URL.

DeferredResult

Successful defer() result from a loader or action

DetectErrorBoundaryFunction deprecated

Function provided by the framework-aware layers to set hasErrorBoundary from the framework-aware errorElement prop

ErrorResult

Unsuccessful result from a loader or action

LazyRouteFunction

lazy() function to load a route definition, which can add non-matching related properties to a route

LoaderFunction

Route loader function signature

LoaderFunctionArgs

Arguments passed to loader functions

MapRoutePropertiesFunction

Function provided by the framework-aware layers to set any framework-specific properties from framework-agnostic properties

PathMatch

A PathMatch contains info about how a PathPattern matched on a URL pathname.

PathPattern

A PathPattern is used to match on some portion of a URL pathname.

RedirectResult

Redirect result from a loader or action

RouteData

Map of routeId -> data returned from a loader/action/error

ShouldRevalidateFunction

Route shouldRevalidate function signature. This runs after any submission (navigation or fetcher), so we flatten the navigation/fetcher submission onto the arguments. It shouldn't matter whether it came from a navigation or a fetcher, what really matters is the URLs and the formData since loaders have to re-run based on the data models that were potentially mutated.

SuccessResult

Successful result from a loader or action

TrackedPromise

§Type Aliases

AgnosticDataIndexRouteObject
AgnosticDataNonIndexRouteObject
AgnosticDataRouteObject

A data route object, which is just a RouteObject with a required unique ID

AgnosticIndexRouteObject

Index routes must not have children

AgnosticNonIndexRouteObject

Non-index routes may have children, but cannot have index

AgnosticRouteObject

A route object represents a logical route, with (optionally) its child routes organized in a tree-like structure.

DataResult

Result from a loader or action - potentially successful or unsuccessful

DeferFunction
FormEncType
FormMethod

Active navigation/fetcher form methods are exposed in lowercase on the RouterState

HTMLFormMethod

Users can specify either lowercase or uppercase form methods on , useSubmit(), <fetcher.Form>, etc.

ImmutableRouteKey

Keys we cannot change from within a lazy() function. We spread all other keys onto the route. Either they're meaningful to the router, or they'll get ignored.

JsonFunction
MutationFormMethod
ParamParseKey
Params

The parameters that were parsed from the URL path.

RedirectFunction
RouteManifest
Submission
V7_FormMethod

In v7, active navigation/fetcher form methods are exposed in uppercase on the RouterState. This is to align with the normalization done via fetch().

V7_MutationFormMethod