Working with APIs in React
Working with APIs shows how a React app talks to a server and shows the data it gets back.
What each lesson covers:
- API Integration: What an API is, async code, the Fetch API, GET, POST, PUT and DELETE requests, typing and handling API data, loading and error states, a service layer, and environment variables.
It is one long, hands-on lesson. You fetch real data, send changes back, and organise the calls in a small service layer so your components stay simple. The same patterns are used again in the capstone project.
Every page runs real React in your browser. Edit the code and see the result next to it. Each lesson ends with exercises that check what your app shows, not how your code is written.
Lessons in this section
- API Integration
What an API is, async code, the Fetch API, GET, POST, PUT and DELETE requests, typing and handling API data, loading and error states, a service layer, and environment variables.