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
Parameter |
Type |
Description |
---|---|---|
component |
ComponentType<P> |
The component to attach the data to. |
type |
string |
The key under which the data will be stored. |
data |
unknown |
Arbitrary value. |
void
Remarks
See https://backstage.io/docs/plugins/composability#component-data.