Skip to main content
Use this hook when you need to track ongoing checkout actions and show loading states in your UI. It’s useful for disabling buttons, showing spinners, or preventing user interactions while the checkout is processing.

Import

Return Value

ActionType Values

The pendingActions array can contain any of these action types:

Usage

Example

A totalizer component that shows a loading skeleton while cart-related actions are processing.

Notes

  • The addActionNameForLoading and removeActionNameForLoading functions are automatically called by useCheckoutAction when actions start and complete
  • Use hasPendingActions for simple loading states, or filter pendingActions for more granular control
  • Related: useCheckoutSession