| 18062 | } |
| 18063 | |
| 18064 | function defineRefPropWarningGetter(props, displayName) { |
| 18065 | var warnAboutAccessingRef = function () { |
| 18066 | if (!specialPropRefWarningShown) { |
| 18067 | specialPropRefWarningShown = true; |
| 18068 | warning(false, '%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); |
| 18069 | } |
| 18070 | }; |
| 18071 | warnAboutAccessingRef.isReactWarning = true; |
| 18072 | Object.defineProperty(props, 'ref', { |
| 18073 | get: warnAboutAccessingRef, |
| 18074 | configurable: true |
| 18075 | }); |
| 18076 | } |
| 18077 | |
| 18078 | /** |
| 18079 | * Factory method to create a new React element. This no longer adheres to |