Look. You know how it goes. Just call an API and grab the data. Simple right? Oh, but it might timeout after 30 seconds. So trap for that. And we should also handle server errors because the backend team is using PHP (zing!). Then once we get the data back, let’s hand it off to the Redux reducers. But let’s also update a few cached data points first. And fetch a few images so the UI is a bit snappier once the user starts scrolling.
Full article