Skip to main content
Version: Next

createExternalRouteRef()

Home > @backstage/frontend-plugin-api > createExternalRouteRef

Creates a route descriptor, to be later bound to a concrete route by the app. Used to implement cross-plugin route references.

Signature:

function createExternalRouteRef<TParams extends {
[param in TParamKeys]: string;
} | undefined = undefined, TParamKeys extends string = string>(config?: {
readonly params?: string extends TParamKeys ? (keyof TParams)[] : TParamKeys[];
defaultTarget?: string;
}): ExternalRouteRef<keyof TParams extends never ? undefined : string extends TParamKeys ? TParams : {
[param in TParamKeys]: string;
}>;

Parameters

Parameter

Type

Description

config

{ readonly params?: string extends TParamKeys ? (keyof TParams)[] : TParamKeys[]; defaultTarget?: string; }

(Optional)

Returns:

ExternalRouteRef<keyof TParams extends never ? undefined : string extends TParamKeys ? TParams : { [param in TParamKeys]: string; }>

Remarks

See https://backstage.io/docs/plugins/composability#routing-system.