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
/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */
import * as React from 'react';
import {
  createContext,
  startTransition,
  unstable_useCacheRefresh as useCacheRefresh,
  useCallback,
  useContext,
  useEffect,
  useMemo,
  useState,
} from 'react';
import {enableHookNameParsing} from 'react-devtools-feature-flags';
import {TreeStateContext} from './TreeContext';
import {BridgeContext, StoreContext} from '../context';
import {
  checkForUpdate,
  inspectElement,
} from 'react-devtools-shared/src/inspectedElementCache';