2022-06-15T11:48:42Z
The React Mega-Tutorial, Chapter 6: Building an API Client
In Chapter 5, the Posts
component was modified to make an API call that gets data from the server. The way it was done, however, does not scale very well, because as the application continues to grow, there's going to be other components that will also need to make their API calls, and having to repeat the API calling logic in several places will be difficult to manage, especially considering that these calls are going to become more complex once authentication and pagination are implemented.