Introduction
In the previous chapter, we learned how to implement navigation in our app. In this chapter, we will learn how to present dynamic content to the user as they navigate around our app.
Data presented to users can come from different sources. It can be hardcoded into the app, but that comes with limitations. To change hardcoded data, we have to publish an update to our app. Some data cannot be hardcoded by its nature, such as currency exchange rates, the real-time availability of assets, and the current weather, to name a few. Other data may become outdated, such as the terms of use of an app.
In such cases, you would usually fetch the relevant data from a server. One of the most common architectures for serving such data is the representational state transfer (REST) architecture. The REST architecture is defined by a set of six constraints: the client-server architecture, statelessness, cacheability, a layered system, code on demand (optional), and a uniform interface...