Skip to main content

createRoutableExtension()

Home > @backstage/core-plugin-api > createRoutableExtension

Extension for components that can have its own URL route (top-level pages, tabs etc.).

Signature:

function createRoutableExtension<T extends (props: any) => JSX.Element | null>(options: {
component: () => Promise<T>;
mountPoint: RouteRef;
name?: string;
}): Extension<T>;

Parameters

ParameterTypeDescription
options{ component: () => Promise<T>; mountPoint: RouteRef; name?: string; }

Returns:

Extension<T>

Remarks

We do not use ComponentType as the return type, since it doesn't let us convey the children prop. ComponentType inserts children as an optional prop whether the inner component accepts it or not, making it impossible to make the usage of children type safe.

See https://backstage.io/docs/plugins/composability#extensions.