@coveo/headless-react
    Preparing search index...

    Interface ProductListingActionCreators

    The product listing action creators.

    interface ProductListingActionCreators {
        fetchMoreProducts(): AsyncThunkAction<
            null
            | QueryCommerceAPIThunkReturn,
            void,
            AsyncThunkCommerceOptions<StateNeededByFetchProductListing>,
        >;
        fetchProductListing(): AsyncThunkAction<
            QueryCommerceAPIThunkReturn,
            void,
            AsyncThunkCommerceOptions<StateNeededByFetchProductListing>,
        >;
        promoteChildToParent(
            payload: PromoteChildToParentPayload,
        ): { payload: PromoteChildToParentPayload; type: string };
    }
    Index

    Methods

    • Fetches and additional page of products and appends it to the current list.

      Returns AsyncThunkAction<
          null
          | QueryCommerceAPIThunkReturn,
          void,
          AsyncThunkCommerceOptions<StateNeededByFetchProductListing>,
      >

      A dispatchable action.

    • Refreshes the product listing.

      Returns AsyncThunkAction<
          QueryCommerceAPIThunkReturn,
          void,
          AsyncThunkCommerceOptions<StateNeededByFetchProductListing>,
      >

      A dispatchable action.

    • Promotes a child product to a parent product.

      Parameters

      • payload: PromoteChildToParentPayload

        The action creator payload.

      Returns { payload: PromoteChildToParentPayload; type: string }

      A dispatchable action.