useEntityPresentation()
Home > @backstage/plugin-catalog-react
> useEntityPresentation
Returns information about how to represent an entity in the interface.
Signature:
function useEntityPresentation(entityOrRef: Entity | CompoundEntityRef | string, context?: {
defaultKind?: string;
defaultNamespace?: string;
}): EntityRefPresentationSnapshot;
Parameters
Parameter |
Type |
Description |
---|---|---|
entityOrRef |
Entity | CompoundEntityRef | string |
The entity to represent, or an entity ref to it. If you pass in an entity, it is assumed that it is NOT a partial one - i.e. only pass in an entity if you know that it was fetched in such a way that it contains all of the fields that the representation renderer needs. |
context |
{ defaultKind?: string; defaultNamespace?: string; } |
(Optional) Optional context that control details of the presentation. |
A snapshot of the entity presentation, which may change over time