3 ms·
* It's not very useful to write error handling code in every component. The thinking about the feature is you'll put it in a few strategic places: https://faceb
by danabramov 9y ago
* It's not very useful to write error handling code in every component. The thinking about the feature is you'll put it in a few strategic places: https://facebook.github.io/react/blog/2017/07/26/error-handling-in-react-16.html#where-to-place-error-boundaries https://facebook.github.io/react/blog/2017/07/26/error-handl...
* If error boundary could catch its own errors, what happened if it tried to render error message and threw then? It would get into an infinite loop, trying to handle its own error and failing again. Thanks to the restriction, this can never happen.