Currently if an error occurs when inspecting a component, an error overlay is shown in the right hand side of DevTools along with a "dismiss" button to allow the inspection to be retried. However, currently this "retry" does not clear the entry from the cache and so it will immediately fail again if the same component is re-selected. We should clear the cache entry so that we actually retry when the modal is dismissed
callStack: null,
  canDismiss: false,
  componentStack: null,
  errorMessage: null,
  hasError: false,
};
export default class ErrorBoundary extends Component<Props, State> {
  state: State = InitialState;
  static getDerivedStateFromError(error: any) {
    const errorMessage =
      typeof error === 'object' &&
      error !== null &&
      error.hasOwnProperty('message')
        ? error.message
        : '' + error;
    const callStack =
      typeof error === 'object' &&
      error !== null &&
      error.hasOwnProperty('stack')
        ? error.stack
            .split('\n')
            .slice(1)
            .join('\n')
        : null;
    return {
      callStack,
      errorMessage,
      hasError: true,
    };
  }