| 18687 | } |
| 18688 | |
| 18689 | function defineKeyPropWarningGetter(props, displayName) { |
| 18690 | var warnAboutAccessingKey = function () { |
| 18691 | if (!specialPropKeyWarningShown) { |
| 18692 | specialPropKeyWarningShown = true; |
| 18693 | warning(false, '%s: `key` 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); |
| 18694 | } |
| 18695 | }; |
| 18696 | warnAboutAccessingKey.isReactWarning = true; |
| 18697 | Object.defineProperty(props, 'key', { |
| 18698 | get: warnAboutAccessingKey, |
| 18699 | configurable: true |
| 18700 | }); |
| 18701 | } |
| 18702 | |
| 18703 | function defineRefPropWarningGetter(props, displayName) { |
| 18704 | var warnAboutAccessingRef = function () { |