@polargold/pg-frontend-vue
    Preparing search index...

    Function useLoadingState

    • A standalone isLoading ref with activate/deactivate actions, each awaiting nextTick() so a template update triggered by the flag has actually happened before the caller continues.

      Ported from luv-autoq-frontend. More general than useApi's built-in isLoading (which is tied to one callback) - useful for multi-step flows where the loading state doesn't map to a single async call.

      Parameters

      • initialState: boolean = false

      Returns {
          activateLoadingState: () => Promise<void>;
          deactivateLoadingState: () => Promise<void>;
          isLoading: Ref<boolean, boolean>;
      }