Last updated February 21, 2020

Once you've got an API with data available for use you'll need to get that data into your React application. This requires writing code to make a network request that retrieves the JSON (or other format) data from the API endpoint, parses it into something useful, and then passes it along to the rest of the application. In much the same way, your browser makes a request for a page, retrieves HTML, and displays it.

The most common way to do this with modern JavaScript is via the Fetch API.

In this tutorial we'll:

  • Discuss why to use Fetch API, and where to find additional information about using it
  • Talk about some good alternatives
  • Get an overview of the ES6 array functions that will be useful when traversing the complex data structures returned from an API

By the end of this tutorial you should have a firm grasp of the concepts and terms related to fetching data from a web services API via JavaScript.