The constructor for the Route class.
An instance of the Route class.
OptionalbaseThe base path of the route.
This is useful if you want to be declarative about the base path of the route and not depend on the router to determine the base path.
OptionalchildrenThe children routes of the route.
This is useful if you want to be declarative about the routes that are direct
children of this route and not depend on the router to determine the children
when there are multiple
OptionalcomponentThe component to render when the route is active.
OptionalhooksHooks to be run before and after the routes are rendered at the router level (independent of the route hooks if applicable).
OptionalnameThe unique identifier of this route. This is useful if you need to track routes outside of the router's scope.
OptionalpathThe path of the route to match against the current path.
OptionalpropsThe props to pass to the component.
OptionalquerystringThe query params of the route.
OptionalstatusThe status of the route once it has been matched or otherwise processed.
OptionaltracesTraces are a list of objects that describe the route's path and query params as it is processed by the router.
OptionalabsoluteThe absolute path of the route by combining the router's base path and the route's path.
OptionaltestParse the route against the given path.
The path to parse against the route.
A route that can be navigated to.
Example