Error Handling using Error Boundaries in React 16

A JavaScript error in the UI shouldn’t break the whole application. To solve this problem for React 16 introduced a new concept of an “error boundary”. Such error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed.