useRouteRef()
Home > @backstage/core-plugin-api
> useRouteRef
React hook for constructing URLs to routes.
Signature:
function useRouteRef<Params extends AnyParams>(routeRef: RouteRef<Params> | SubRouteRef<Params>): RouteFunc<Params>;
Parameters
Parameter | Type | Description |
---|---|---|
routeRef | RouteRef<Params> | SubRouteRef<Params> | The ref to route that should be converted to URL. |
Returns:
RouteFunc<Params>
A function that will in turn return the concrete URL of the routeRef
.
Remarks
See https://backstage.io/docs/plugins/composability#routing-system