* Don't show "context" for classes without either contextType or contextTypes
* For classes with contextTypes, change the label to "legacy context" instead

---
Originally reported by @gaearon via https://github.com/bvaughn/react-devtools-experimental/issues/368
const viewSource = useCallback(
    () => {
      if (viewElementSourceFunction != null && inspectedElement !== null) {
        viewElementSourceFunction(
          inspectedElement.id,
          ((inspectedElement: any): InspectedElement),
        );
      }
    },
    [inspectedElement, viewElementSourceFunction],
  );
  
  
  const canViewSource =
    inspectedElement !== null &&
    inspectedElement.canViewSource &&
    viewElementSourceFunction !== null &&
    (canViewElementSourceFunction === null ||
      canViewElementSourceFunction(inspectedElement));
  const isSuspended =
    element !== null &&
    element.type === ElementTypeSuspense &&
    inspectedElement != null &&
    inspectedElement.state != null;
  const canToggleSuspense =
    inspectedElement != null && inspectedElement.canToggleSuspense;
  
  const toggleSuspended = useCallback(
    () => {
      let nearestSuspenseElement = null;