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
return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
export function isFragment(object: any) {
  return typeOf(object) === REACT_FRAGMENT_TYPE;
}
export function isLazy(object: any) {
  return typeOf(object) === REACT_LAZY_TYPE;
}
export function isMemo(object: any) {
  return typeOf(object) === REACT_MEMO_TYPE;
}
export function isPortal(object: any) {
  return typeOf(object) === REACT_PORTAL_TYPE;
}
export function isProfiler(object: any) {
  return typeOf(object) === REACT_PROFILER_TYPE;
}
export function isStrictMode(object: any) {
  return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
export function isSuspense(object: any) {
  return typeOf(object) === REACT_SUSPENSE_TYPE;
}