When a React component throws a JavaScript error, it tends to crash the whole application. It’s important to capture that error and display a meaningful feedback message, whilst also preventing the entire application from collapsing.
Learn more about how to capture JavaScript rendering errors in React components.