Skip to main content
Version: Next

createComponentExtension()

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

Plain React component extension.

Signature:

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

Parameters

Parameter

Type

Description

options

{ component: ComponentLoader<T>; 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.