warningHint='Did you accidentally use a plain function component for an element instead?';
}
if(warningHint!==undefined){
returnnewError(`Invalid${location}\`${safePropName}\`suppliedto\`${componentName}\`.`+`Expectedanelementthatcanholdaref.${warningHint}`+'For more information see https://mui.com/r/caveat-with-refs-guide');