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