By default, if your application throws an error during rendering, React will remove its UI from the screen.
Error Boundaries were introduced in React v16 as a way to catch tricky errors that occur during the render phase.
To prevent this, Error Boundaries, introduced in React v16, allow you to wrap a part of your UI into a special component, `<ErrorBoundary>` that lets you display some fallback UI instead of the part that crashed—for example, an error message.
We will inevitably encounter unexpected errors in our apps during development. You could be trying to access a deeply-nested property on an object that does not exist, or sometimes it is not in your control (like a failed HTTP request to a third-party API).
Error Boundaries provide a way to gracefully handle these errors.
Now that Error Boundaries are available since React version 16, it’s generally advisable to use at least one Error Boundary at the root of your app (e.g., the `App.js` file). This will prevent users from seeing a blank HTML page and perhaps see a nice fallback UI instead.
#### More info
[React docs](https://beta.reactjs.org/reference/react/Component#catching-rendering-errors-with-an-error-boundary)
___
**Tags**: #errorBoundary