Chapter 8. Incorporating Data
Data is the lifeblood of our applications. It flows like water, and it nourishes our components with value. The user interface components we’ve composed are vessels for data. We fill our applications with data from the internet. We collect, create, and send new data to the internet. The value of our applications is not the components themselves—it’s the data that flows through those components.
When we talk about data, it may sound a little like we’re talking about water or food. The cloud is the abundantly endless source from which we send and receive data. It’s the internet. It’s the networks, services, systems, and databases where we manipulate and store zettabytes of data. The cloud hydrates our clients with the latest and freshest data from the source. We work with this data locally and even store it locally. But when our local data becomes out of sync with the source, it loses its freshness and is said to be stale.
These are the challenges we face as developers working with data. We need to keep our applications hydrated with fresh data from the cloud. In this chapter, we’re going to take a look at various techniques for loading and working with data from the source.
Requesting Data
In the movie Star Wars, the droid C-3P0 is a protocol droid. His specialty, of course, is communication. He speaks over six million languages. Surely, C-3P0 knows how to send an HTTP request, because the Hyper Text Transfer Protocol is one of the most popular ways ...
Get Learning React, 2nd 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.