DEV Community

Discussion on: Fetch vs. Axios - comparison

Collapse
 
michaelcurrin profile image
Michael Currin • Edited

Note that while fetch is standard in modern browsers, it is not in Node. So if you have to run any fetch commands on your backend or you want your code processing to not complain that it doesn't understand fetch on your frontend JS... then install a drop-in replacement like

npm i node-fetch

The NPM readme for that package covers it well

npmjs.com/package/node-fetch#motiv...

Also i would not say that Ajax has gone away like you suggest. Ajax is a concept of non-blocking (asynchronous) requests and fetch, axios etc. are tools to achieve that.

BTW request is another popular library you could do a follow up post on. And jQuery also has $.ajax(url) and $.json(url) and other methods which handle the requests library for you.