Use provided `AbortSignal` or omit it from `initialOptions` type definition
Opened this issue · 1 comments
jaandrle commented
There would be better to allow use also original Abort Signal (if provided):
use-x/src/use-fetch/use-fetch.solution.ts
Lines 95 to 96 in ca70f15
const requestInit = (requestOptions || {});
requestInit.signal = requestInit.signal ? mergeSignals(requestInit.signal, abortController.current.signal) : abortController.current.signal;
w3cj commented
Thanks! I will add this and a test soon. Will use the new built in AbortSignal.any()
- https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static