5 ms·
Thanks Dan and React team! Question: Will this resolve these cases: https://twitter.com/dan_abramov/status/770917958713544704 https://twitter.com/dan_abramov/s
by armandososa 9y ago
Thanks Dan and React team!
Question: Will this resolve these cases: https://twitter.com/dan_abramov/status/770917958713544704 https://twitter.com/dan_abramov/status/770917958713544704? or we should keep catching immediately after an ajax request?
- danabramov 9y agoIf you don't add an error boundary, and you get an exception, then the app will unmount. The error will get logged to console in development even if the app swallows the error. So yes, it will help notice (and fix) such issues sooner. But I still recommend the explicit then(onSuccess, onError) form so that unhandled exceptions go through the top of the stack and register as uncaught errors in DevTools.