Skip to main content

createExternalRouteRef()

Home > @backstage/core-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<Params extends {
[param in ParamKey]: string;
}, Optional extends boolean = false, ParamKey extends string = never>(options: {
id: string;
params?: ParamKey[];
optional?: Optional;
}): ExternalRouteRef<OptionalParams<Params>, Optional>;

Parameters

ParameterTypeDescription
options{ id: string; params?: ParamKey[]; optional?: Optional; }Description of the route reference to be created.

Returns:

ExternalRouteRef<OptionalParams<Params>, Optional>

Remarks

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