Combining API calls
As development moves forward and features become more involved, we're inevitably faced with complex API scenarios. This means that there's no longer a simple API endpoint that delivers everything the feature needs with one call. Instead, our code has to stitch together two or more resources from different endpoints just to get the data needed by the feature.
In this section, we'll look at action creator functions that fetch data from multiple asynchronous resources and pass them to stores as payload data. These stores then convert these to information required by features. Then, we'll look at an alternative approach, where we compose action creator functions out of smaller action creator functions, each pulling data from their ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access