1. 11
    Refactor API Calls into a Service Function
    1m 46s

Refactor API Calls into a Service Function

InstructorAndy Van Slaars

Share this video with your friends

Send Tweet

Our components shouldn't be concerned with the implementation details around how we call our back end services. We may need to change details of how the API is called, we may want to add caching or offline storage and we may need to use the same API call in other components. To clean up our component code and abstract those details away from our component code, we'll move our fetch call into a service function and update our component to use our new function.