packages/material-ui-utils/src/elementAcceptingRef.ts/isClassComponent
function isClassComponent(elementType: Function) {
  // elementType.prototype?.isReactComponent
  const { prototype = {} } = elementType;

  return Boolean(prototype.isReactComponent);
}