Week 7: Async JavaScript & APIs
Week 7: Async JavaScript & APIs
Learning Objectives: By the end of this week, you will be able to use async/await and the Fetch API to retrieve data from external APIs, handle errors gracefully, and render dynamic content to the DOM.
Sessions
Synchronous vs asynchronous code, Promises, async/await, Fetch API, and rendering API data
Component functions, central state, props, event delegation, hash routing, and building CourseHub
Topics Covered
- Synchronous vs asynchronous JavaScript
- Callbacks and callback hell
- Promises and .then()/.catch() chains
- async/await syntax and try/catch error handling
- The Fetch API and the two-step fetch pattern
- Working with JSON data
- Rendering API data to the DOM
- API response structures and URL construction
- Loading, success, and error UI states
- FormData API and input validation