Skip to main content

attachComponentData()

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

Stores data related to a component in a global store.

Signature:

function attachComponentData<P>(component: ComponentType<P>, type: string, data: unknown): void;

Parameters

ParameterTypeDescription
componentComponentType<P>The component to attach the data to.
typestringThe key under which the data will be stored.
dataunknownArbitrary value.

Returns:

void

Remarks

See https://backstage.io/docs/plugins/composability#component-data.