| 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 | { |