packages/material-ui-utils/src/getDisplayName.ts/getFunctionComponentName
function getFunctionComponentName(
  Component: React.FunctionComponent | React.ComponentClass,
  fallback = '',
) {
  return Component.displayName || Component.name || getFunctionName(Component) || fallback;
}