Type Alias AsyncEffectCallback

AsyncEffectCallback: ((signal: AbortSignal) => PromiseLike<(() => void) | void>)

The callback provided to useAsyncEffect.

The returned cleanup callback is ignored if signal was aborted.

Type declaration

    • (signal): PromiseLike<(() => void) | void>
    • Parameters

      • signal: AbortSignal

        The signal that is aborted when effect was discarded.

      Returns PromiseLike<(() => void) | void>

      The cleanup callback that is invoked when effect unmounted.