Shopvento UI - v0.2.0
    Preparing search index...

    Function useAccountResource

    • Load a cancellable account resource when its host dependencies change.

      Type Parameters

      • T

      Parameters

      • load: (signal: AbortSignal) => Promise<T>

        Cancellable async resource loader.

      • dependencies: unknown[] = []

        Host dependency values that reload the resource. Defaults to [].

      Returns { data: T | null; error: string | null; loading: boolean; reload: () => void }

      • data: T | null

        Loaded authoritative data, or null while unavailable.

      • error: string | null

        Customer-visible error, or null.

      • loading: boolean

        Whether the read is pending.

      • reload: () => void

        Reload the resource from its authoritative API.