Phase 05Designing an API someone else has to use251 of 434
Wiring a front end to it properly
Every state the contract implies: loading, empty, error, retry, stale, and the one where the user pressed the button twice.
Build50 minAI pair
Build this in your own editor
This one runs on your machine rather than in the browser workbench. Work to the outcomes below, then come back and mark it complete.
You should now be able to
- Render distinct loading, empty and error states
- Cancel or ignore a response that is no longer wanted
- Handle a failed mutation without losing the user input
Loading…