Creates and handles an AbortSignal**
const [signal, abort, filterAbortError] = makeAbortable({ timeout: 10000 });const fetcher = (url) => fetch(url, {signal:signal()}).catch(filterAbortError); // filters abort errors Copy
const [signal, abort, filterAbortError] = makeAbortable({ timeout: 10000 });const fetcher = (url) => fetch(url, {signal:signal()}).catch(filterAbortError); // filters abort errors
Returns an accessor for the signal and the abort callback.
Options are optional and include:
timeout
noAutoAbort
Creates and handles an AbortSignal**
Returns an accessor for the signal and the abort callback.
Options are optional and include:
timeout
: time in Milliseconds after which the fetcher aborts automaticallynoAutoAbort
: can be set to true to make a new source not automatically abort a previous request