The product action creators.

interface ProductActionCreators {
    productClick(
        payload: ProductClickPayload,
    ): AsyncThunkAction<
        void,
        ProductClickPayload,
        AsyncThunkCommerceOptions<CommerceEngineState>,
    >;
    productView(
        payload: Product,
    ): AsyncThunkAction<
        void,
        Product,
        AsyncThunkCommerceOptions<CommerceEngineState>,
    >;
}

Methods

  • Logs a click analytics event for a product.

    Parameters

    Returns AsyncThunkAction<
        void,
        ProductClickPayload,
        AsyncThunkCommerceOptions<CommerceEngineState>,
    >

    A dispatchable action.

  • Logs a view analytics event for a product.

    Parameters

    • payload: Product

      The action creator payload.

    Returns AsyncThunkAction<void, Product, AsyncThunkCommerceOptions<CommerceEngineState>>

    A dispatchable action.