14

Working with External Data in React

Dealing with external data is pretty much standard in web apps today. This “dealing” typically looks as follows:

1. Your app makes a request for some data to a remote service.

2. The remote service receives the request and sends back some data.

3. Your app receives the data.

4. Your app formats and displays the data to the user.

Whether or not you realize it, almost all your favorite websites follow these four steps…Facebook, Amazon, Twitter, Instagram, Gmail, KIRUPA, and so on. When you starting loading a page on any of these sites, they all display some data initially.

A screenshot shows a web browser displaying the mobile twitter page of Kirupa Chinnathambi. The page shows Kirupa's retweet with several replies below it.

To keep your initial page size ...

Get Learning React: A Hands-On Guide to Building Web Applications Using React and Redux, Second edition 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.