See #17798
case IndeterminateComponent:
        return getDisplayName(resolvedType);
      case ForwardRef:
        
        return (
          (type && type.displayName) ||
          getDisplayName(resolvedType, 'Anonymous')
        );
      case HostRoot:
        return null;
      case HostComponent:
        return type;
      case HostPortal:
      case HostText:
      case Fragment:
        return null;
      case MemoComponent:
      case SimpleMemoComponent:
        return getDisplayName(resolvedType, 'Anonymous');
      case SuspenseComponent:
        return 'Suspense';
      case SuspenseListComponent:
        return 'SuspenseList';
      default:
        const typeSymbol = getTypeSymbol(type);
        switch (typeSymbol) {
          case CONCURRENT_MODE_NUMBER:
          case CONCURRENT_MODE_SYMBOL_STRING:
          case DEPRECATED_ASYNC_MODE_SYMBOL_STRING:
            return null;