The state of the InstantProducts controller.

interface InstantProductsState {
    error: null | CommerceAPIErrorResponse | SerializedError;
    isLoading: boolean;
    products: Product[];
    query: string;
    totalCount: number;
}

Properties

error: null | CommerceAPIErrorResponse | SerializedError

An error returned when executing an instant products request, if any. This is null otherwise.

isLoading: boolean

Determines if a search is in progress for the current query.

products: Product[]

The instant products for the current query.

query: string

The current query for instant products.

totalCount: number

The total number of products that match the current query.