Austin Gil
1 min readMar 15, 2020

--

In the Pros for fetch, you list:

  • Is a native browser API
  • Not is necessary to load it from an external source
  • No need of more dependencies
  • Is compatible in most of the commonly recent used browsers

These are 4 points basically saying the same thing. You could just put it into one “Native browser API”. The fact that it’s a native API means it’s compatible with most browsers and is not needed to load external resources, hence less dependencies.

Same with several of the Cons sections:

  • Not is native
  • Is necessary to load it from an external source

Basically says the same thing twice. If it’s not native, then you have to load it from an external resource.

For fetch, you say that it’s “the natural replace of native XMLHttpRequest object”, which I don’t think is true. XHR has two things that fetch does not, which is the ability to cancel a request, and the ability to check the progress on a request (like a large file upload). Both of those are major pros for the right occasion. But yeah, otherwise I’d say use fetch.

I hope that is helpful feedback.

--

--

Austin Gil

I want to help you build better websites. I create cool stuff for the web and share what I learn.