Async Requests and Error States
Once you leave local state behind, the browser needs to wait for network work. This lesson teaches the shape of an asynchronous request, how to show loading state, and how to report failures cleanly.
The goal is to make the UI honest. If the request fails, say so. If it succeeds, update the visible state in one place.
Edit the panels below and press Run to preview. Nothing you type here is saved — refreshing the page restores the original starter code.