bringapp
    Preparing search index...

    Function useDynamicEntityList

    • Custom hook for fetching and managing a dynamic entity list.

      Type Parameters

      • T = object

        The type of the entity list items.

      • P = object

      Parameters

      • wpURL: string

        The URL of the WordPress site.

      • entitySlug: undefined | null | string

        The slug of the entity.

      • entityType: undefined | null | EntityType

        The type of the entity.

      • options: UseDynamicEntityListOptions = {}

        The options for fetching the entity list.

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

      • An object containing the entity list and a ref for the intersection observer.