Skip to content

selectIsVatEu$(): Observable<boolean>

The selectIsVatEu$ method allows to select whether the current order has obligations regarding the eu vat or not. You can read more about it here.

Returned value

A returned value has a type of Observable<boolean> representing whether the current order has eu vat or not.

Example

In this example we make a basketOverallApi call to select whether the current order has eu vat or not.

useStorefront(async ({ eventBus, getApi }) => {
    eventBus.on('basket.initialized', async () => {
        const basketOverallApi = await getApi('basketOverallApi');

        const isVatEu$ = basketOverallApi.selectIsVatEu$();

        isVatEu$.subscribe((isVatEu) => {
            console.log('current value of eu vat: ', isVatEu);
        });
    });
});

Basket Overall API methods reference