Skip to main content
Version: Next

getComponentData()

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

Retrieves data attached to a component.

Signature:

function getComponentData<T>(node: ReactNode, type: string): T | undefined;

Parameters

Parameter

Type

Description

node

ReactNode

React component to look up.

type

string

Key of the data to retrieve.

**Returns:**

T | undefined

Data stored using attachComponentData().

Remarks

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