import React from "react"; /** * The error boundary for BrowserCompatibilityTable. * * When the whole BrowserCompatibilityTable crashes, for whatever reason, * this component will show a friendly message * to replace that crashed component */ export class BrowserCompatibilityErrorBoundary extends React.Component< any, any > { state = { error: null, }; componentDidCatch(error, _errorInfo) { this.setState({ error, }); // TODO: Report this error to Sentry, https://github.com/mdn/stumptown-renderer/issues/99 } render() { if (this.state.error) { return ( <>