Asynchronous operations (API calls) have multiple possible outcomes, so you must model more than just the data — you need to represent loading, success, and error states. Modeling this well prevents UI bugs like showing stale data or no feedback.
The naive approach and its flaws
[data, setData] = ();
[loading, setLoading] = ();
[error, setError] = ();
