class ErrorBoundary extends React.Component {
            state = { error: null };
            componentDidCatch(error) {
                this.setState({ error });
            }