Web Development · module 8 of 13
Async APIs & Persistence
Use promises, async/await, fetch, JSON, error handling, and localStorage to build data-driven pages.
What this module covers
5 steps · Web Development
Step 1. Lesson: Async APIs & Persistence
Use promises, async/await, fetch, JSON, error handling, and localStorage to build data-driven pages. Learning objectives - Recognize when async apis & persistence is the right tool. - Explain the role of async, fetch, json. - Build a small working example before combining it with a larger interface. - Identify one accessibility, maintainability, or error-handling improvement. Read the example, predict what it will do, then complete the small change described in the check question.
Use promises, async/await, fetch, JSON, error handling, and localStorage to build data-driven pages. In Web Lab, make the state/interaction visible in the UI so completion is easy to verify.
Check yourself: [Web Lab] Use the example to demonstrate async apis & persistence.
Step 2. Quiz: Async APIs & Persistence
Check your understanding of Async APIs & Persistence.
fetch only rejects network failures; HTTP error responses still need an explicit status check. In Web Lab, make the state/interaction visible in the UI so completion is easy to verify.
Check yourself: [Web Lab] Complete the knowledge check.
Step 3. Exercise: Async APIs & Persistence
Fetch a list, show loading and error states, then render the successful response.
This exercise turns the Async APIs & Persistence lesson into a working code change. In Web Lab, make the state/interaction visible in the UI so completion is easy to verify.
Check yourself: [Web Lab] Does the solution use async and fetch and json?
Step 4. Review lab: Explain & improve Async APIs & Persistence
Rebuild the exercise without copying the solution. Then improve it in two ways: make the code easier to understand and add one useful edge case, responsive behavior, accessibility improvement, or error state. Finally, write a short explanation of how async, fetch, json work together.
Rebuilding from memory and improving an edge case turns recognition into durable skill. In Web Lab, make the state/interaction visible in the UI so completion is easy to verify.
Check yourself: [Web Lab] Does the improved version still use async, fetch, json clearly?
Step 5. Mini project: Async APIs & Persistence
Build a weather or media search app with async data, loading feedback, errors, saved favorites, and recent searches.
The mini project combines the module lesson, quiz, and exercise into one portfolio-ready result. In Web Lab, make the state/interaction visible in the UI so completion is easy to verify.
Check yourself: [Web Lab] Does the project apply the module's async apis & persistence skills?
Loading code lab...