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.
Let your agent build it. The Ollie Shop skill ships with projects created by npx create-ollie-shop and knows which action types to watch for a given piece of UI.
Prompt
Don’t have the skill yet? Install it.

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