bringapp
    Preparing search index...

    Function useDynamicEntityProps

    • Custom hook for fetching dynamic entity props.

      Type Parameters

      • T = object

        The type of the entity props.

      • P = object

      Parameters

      • wpURL: string

        The WordPress URL.

      • entityId: undefined | null | number

        The ID of the entity.

      • entityType: undefined | null | EntityType

        The type of the entity.

      • options: UseDynamicEntityPropsOptions = {}

        The options for fetching the entity props.

      Returns
          | {
              entityProps: DynamicEntityProps<T>;
              params: P;
              ref: (node?: null | Element) => void;
          }
          | { entityProps: null; params: P; ref: (node?: null | Element) => void }

      • The entity props and a ref for lazy loading.