UseRequestOptions

type UseRequestOptions = object;

Options accepted by useRequest.

Properties

perRequestSignal()?

optional perRequestSignal: () => AbortSignal;

Factory invoked on every attempt (initial fire + every refresh()). The returned signal is passed through to the underlying .reactiveStore({ perRequestSignal }) so aborting it cancels just the current attempt.

The most common use is per-attempt timeouts: perRequestSignal: () => AbortSignal.timeout(5000) gives every attempt its own 5-second clock that resets on refresh().

Held in a ref synced to the latest render's closure — there is no need to memoize an inline factory.

Returns

AbortSignal

On this page