| 18722 | } |
| 18723 | |
| 18724 | function defineKeyPropWarningGetter(props, displayName) { |
| 18725 | var warnAboutAccessingKey = function () { |
| 18726 | if (!specialPropKeyWarningShown) { |
| 18727 | specialPropKeyWarningShown = true; |
| 18728 | 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); |
| 18729 | } |
| 18730 | }; |
| 18731 | warnAboutAccessingKey.isReactWarning = true; |
| 18732 | Object.defineProperty(props, 'key', { |
| 18733 | get: warnAboutAccessingKey, |
| 18734 | configurable: true |
| 18735 | }); |
| 18736 | } |
| 18737 | |
| 18738 | function defineRefPropWarningGetter(props, displayName) { |
| 18739 | var warnAboutAccessingRef = function () { |