Axios vs Fetch

function getData(){   return fetch("someurl")
.then((res) => res.json())
.then((data) => console.log(data))
.then((data) => console.log(data))




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Enhanced Object Literals in Javascript

ReactJS Vs NodeJS: Better for app development in 2022

Writing Custom Vee-Validate Rules in Vue Js

Digix Dev Update — 20 Jan 2017

Unsolving the mysteries of yarn/npm link for libraries development

Advance javascript and Es6 some important topics.

Sets and Maps in javascript

Angular Virtual Scrolling — ngVirtualScrolling

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ben Harter-Murphy

Ben Harter-Murphy

More from Medium

What is JSX? What are the differences between JS, JSX, and HTML?

Code Splitting in React — All You Need to Know

Javascript Project — JSChords

#Hawksight review ❤️