import { Component } from 'react'; import { AsyncState } from './AsyncState.jsx'; export class AppErrorBoundary extends Component { state = { failed: false }; static getDerivedStateFromError() { return { failed: true }; } render() { if (this.state.failed) { return (
window.location.reload()} />
); } return this.props.children; } }