render() {
          return (
            <React.unstable_AsyncMode>
              <ErrorBoundary />
            </React.unstable_AsyncMode>
          );
        }
      }
      class ErrorBoundary extends React.Component {
        state = {
          error: null,
        };
        componentDidCatch(error) {
          caughtError = error;
          this.setState({error});
        }
        render() {
          return this.state.error ? <Bar /> : <Foo />;
        }
      }
      class Foo extends React.Component {