14. Fetching Data by Making API Requests
Overview
This chapter will introduce you to the various ways to fetch data by making API requests in React. You will do some hands-on exercises on fetching data from servers using RESTful APIs, the Fetch API, and Axios. We will compare these three with various parameters and we will see how Axios is better than the rest. By the end of this chapter, you will have a good understanding of why the Axios API is preferred when we make API requests in React.
Introduction
Most modern apps receive data from servers and dynamically update the content. For example, a weather application will make requests to receive today's weather data from its servers. With React apps, it is also essential to communicate ...
Get The React Workshop now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.