diff --git a/packages/react/src/ReactElement.js b/packages/react/src/ReactElement.js index 4d0c674dc21..99a465fe2e9 100644 --- a/packages/react/src/ReactElement.js +++ b/packages/react/src/ReactElement.js @@ -229,20 +229,15 @@ export function createElement(type, config, children) { } if (__DEV__) { if (key || ref) { - if ( - typeof props.$$typeof === 'undefined' || - props.$$typeof !== REACT_ELEMENT_TYPE - ) { - const displayName = - typeof type === 'function' - ? type.displayName || type.name || 'Unknown' - : type; - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - if (ref) { - defineRefPropWarningGetter(props, displayName); - } + const displayName = + typeof type === 'function' + ? type.displayName || type.name || 'Unknown' + : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); } } }