3 ms·
This sounds interesting, but very error prone, no? - Some code could throw a legitimate error, that would take the place of the promise. - Some code may catch
by d--b 5y ago
This sounds interesting, but very error prone, no?
- Some code could throw a legitimate error, that would take the place of the promise.
- Some code may catch the promise and treat it as if it was an error.
- pavlov 5y agoThis is in context of React components which are functions but only ever executed by the React runtime itself. So there’s no other code that could catch the promise. And if another component throws an error first, that’s what needs to be handled anyway.