Thanks for the suggestion! This AbortController solution makes more explicit the cancel operation. Anyways, I don't use it very often because of the low browser support. Maybe, I should start using it shipping a polyfill for older browsers 🤔.
An experienced software developer with a strong background in developing award-winning web and mobile applications for diverse clients with 6+ years of industry experience.
Thanks for the suggestion! This
AbortController
solution makes more explicit the cancel operation. Anyways, I don't use it very often because of the low browser support. Maybe, I should start using it shipping a polyfill for older browsers 🤔.If you are worried about browser support, axios offers a similar API on top of XHR or go the polyfill way as you have said.