MCPcopy Index your code
hub / github.com/microsoft/SandDance / defineRefPropWarningGetter

Function defineRefPropWarningGetter

docs/external/js/react.development.js:702–718  ·  view source on GitHub ↗
(props, displayName)

Source from the content-addressed store, hash-verified

700 }
701
702 function defineRefPropWarningGetter(props, displayName) {
703 var warnAboutAccessingRef = function () {
704 {
705 if (!specialPropRefWarningShown) {
706 specialPropRefWarningShown = true;
707
708 error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
709 }
710 }
711 };
712
713 warnAboutAccessingRef.isReactWarning = true;
714 Object.defineProperty(props, 'ref', {
715 get: warnAboutAccessingRef,
716 configurable: true
717 });
718 }
719
720 function warnIfStringRefCannotBeAutoConverted(config) {
721 {

Callers 1

createElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected