Skip to content

select$(): Observable<Tax[]>

The select$ method allows to select a list of taxes associated with a current basket.

Returned value

A returned value has a type of Observable<Tax[]> representing a list of taxes.

Example

In this example we make a basketTaxesApi call to select the list of taxes for a current basket.

useStorefront(async (storefront) => {
    let basketTaxesApi = storefront.getApiSync('basketTaxesApi');

    if (!basketTaxesApi) {
        const featureSystemApi = this.getApiSync('FeatureSystemApi');
        await featureSystemApi.registerDynamic('basket');

        basketTaxesApi = storefront.getApiSync('basketTaxesApi');
    }

    const taxesList$ = basketTaxesApi.select$();
});

Basket Taxes API methods reference

Models reference