Function useRetry

  • Calls an asynchronous function with retry logic until a condition is met.

    Type Parameters

    • AF extends AsyncFunc

    Parameters

    • injectableFn: AF

      The asynchronous function to call.

    • shouldRetry: ((failureCount, e) => boolean | Promise<any>)

      A function that determines whether to retry or not.

        • (failureCount, e): boolean | Promise<any>
        • Parameters

          • failureCount: number
          • e: any

          Returns boolean | Promise<any>

    Returns void

    This function does not return anything.

Generated using TypeDoc