https://github.com/facebook/react/blob/49af88991c3a3e79e663e495458fad12d3162894/packages/react-devtools-shared/src/utils.js#L491

We have SuspenseList for the tree view but not when printing JSX.

When we fallthrough here we call getDisplayName with a symbol, because we assume that if it's not a string, then it's a function. We should be checking whether it is a function before calling getDisplayName.

Subsequently if we call getDisplayName with a symbol we get the error `invalid value used as weak map key` which messes up things after that. I think that's the actual cause of https://github.com/facebook/react/pull/19364
Portal,
  Profiler,
  StrictMode,
  Suspense,
} from 'react-is';
import {
  TREE_OPERATION_ADD,
  TREE_OPERATION_REMOVE,
  TREE_OPERATION_REORDER_CHILDREN,
  TREE_OPERATION_UPDATE_TREE_BASE_DURATION,
} from '.constants';
import {ElementTypeRoot} from 'react-devtools-sharedsrctypes';
import {
  LOCAL_STORAGE_FILTER_PREFERENCES_KEY,
  LOCAL_STORAGE_SHOULD_BREAK_ON_CONSOLE_ERRORS,
  LOCAL_STORAGE_SHOULD_PATCH_CONSOLE_KEY,
} from '.constants';
import {ComponentFilterElementType, ElementTypeHostComponent} from '.types';
import {
  ElementTypeClass,
  ElementTypeForwardRef,
  ElementTypeFunction,
  ElementTypeMemo,
} from 'react-devtools-sharedsrctypes';
import {localStorageGetItem, localStorageSetItem} from '.storage';
import {meta} from '.hydration';
import type {ComponentFilter, ElementType} from '.types';
const cachedDisplayNames: WeakMap<Function, string> = new WeakMap();
const encodedStringCache = new LRU({max: 1000});
export function alphaSortKeys(a: string, b: string): number {