3 ms·
And it’s so easy: loading = true try { await fetch(…) } finally { loading = false } …while the error bubbles up to some global ha
by 9dev 3y ago
And it’s so easy:
loading = true
try {
await fetch(…)
} finally {
loading = false
}
…while the error bubbles up to some global handler. This is such a low hanging fruit for the user experience…
- JoeyJoJoJr 3y agoTo be fair, it usually starts out that easy, until you require multiple fetch requests and conditional logic for separate CRUD operations.
- internetter 3y agoI've worked in codebases where this bubbling is trivial, and ones where its impossible. The key is abstractions.