Skip to main content

useEntity

A hook that provides an entity and a flag indicating if the entity is pending loading.

Parameters

entityProvider

EntityProvider

The entity provider.

watchedComponents

keyof ComponentsRecord[] | 'any'

The components to watch.

Returns

entity

Entity | null

The entity.

isPending

boolean

Whether the entity is pending loading.

Examples

Loading samples...