| 20045 | } |
| 20046 | |
| 20047 | function defineRefPropWarningGetter(props, displayName) { |
| 20048 | var warnAboutAccessingRef = function () { |
| 20049 | if (!specialPropRefWarningShown) { |
| 20050 | specialPropRefWarningShown = true; |
| 20051 | 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); |
| 20052 | } |
| 20053 | }; |
| 20054 | warnAboutAccessingRef.isReactWarning = true; |
| 20055 | Object.defineProperty(props, 'ref', { |
| 20056 | get: warnAboutAccessingRef, |
| 20057 | configurable: true |
| 20058 | }); |
| 20059 | } |
| 20060 | |
| 20061 | /** |
| 20062 | * Factory method to create a new React element. This no longer adheres to |