One of my projects is using axios to handle
AJAX calls. However, the project comes from a framework that is very opinionated
as far as the front end setup. It comes with its own custom webpack setup and
environment when everything is built for you, but when you have a coding test or
a fairly simple or short-term project that just needs to get going, you need to
know how to do things yourself.
That brings us to fetch.
It’s already part of 95% of browsers
(except for Internet Exploder and Opera Mini at the time of this writing), so
unless you absolutely need that last 5%, it looks fine. It does work a little
differently than axios, so it needs a slightly different structure.