Open jaandrle opened 4 weeks ago
There would be better to allow use also original Abort Signal (if provided): https://github.com/w3cj/use-x/blob/ca70f15c8921a0c5ac65dbc317dfb0af1fe22b91/src/use-fetch/use-fetch.solution.ts#L95-L96
const requestInit = (requestOptions || {}); requestInit.signal = requestInit.signal ? mergeSignals(requestInit.signal, abortController.current.signal) : abortController.current.signal;
…using https://www.npmjs.com/package/abort-utils
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
AbortSignal.any()
There would be better to allow use also original Abort Signal (if provided): https://github.com/w3cj/use-x/blob/ca70f15c8921a0c5ac65dbc317dfb0af1fe22b91/src/use-fetch/use-fetch.solution.ts#L95-L96
…using https://www.npmjs.com/package/abort-utils