Hint
pending β fulfilled/rejected; .then chains; .catch handles errors
A Promise is a value that may be available now or later. States: pending β fulfilled / rejected. Once settled, immutable.
fetch('/api/data')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err))
.finally(() => setLoading(false));
Combinators: Promise.all (all must resolve), Promise.allSettled (wait all), Promise.race (first settles), Promise.any (first resolves).