Resolves a route reference into a function that generates a path for it,
or undefined when the route reference has no bound route in the app.
Optionaloptions: { sourcePath?: string }
OptionalsourcePath?: stringAn absolute path to use as a starting point when resolving the route. If no path is provided the route will be resolved from the root of the app.
Matches an app-relative pathname against the app's route tree.
Matches are ordered from outermost to innermost. When a node is supplied, only matches belonging to that node or its app-tree ancestors are returned. Nodes without a route inherit their ancestors' routing scope. An unmatched pathname returns an empty array of matches.
The pathname excludes the deployment basename. It can differ from the current browser location, allowing adapters to resolve navigation before React renders the destination.
Resolves routes and app-relative pathnames against the app's route tree.
Remarks
Available as
coreApis.routeResolution.