The constructor for the Route
class.
An instance of the Route
class.
Optional
baseThe 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.
Optional
childrenThe 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
Optional
componentThe component to render when the route is active.
Optional
hooksHooks to be run before and after the routes are rendered at the router level (independent of the route hooks if applicable).
Optional
nameThe unique identifier of this route. This is useful if you need to track routes outside of the router's scope.
Optional
pathThe path of the route to match against the current path.
Optional
propsThe props to pass to the component.
Optional
querystringThe query params of the route.
Optional
statusThe status of the route once it has been matched or otherwise processed.
Optional
tracesTraces are a list of objects that describe the route's path and query params as it is processed by the router.
A route that can be navigated to.
Example