| 20031 | } |
| 20032 | |
| 20033 | function defineKeyPropWarningGetter(props, displayName) { |
| 20034 | var warnAboutAccessingKey = function () { |
| 20035 | if (!specialPropKeyWarningShown) { |
| 20036 | specialPropKeyWarningShown = true; |
| 20037 | 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); |
| 20038 | } |
| 20039 | }; |
| 20040 | warnAboutAccessingKey.isReactWarning = true; |
| 20041 | Object.defineProperty(props, 'key', { |
| 20042 | get: warnAboutAccessingKey, |
| 20043 | configurable: true |
| 20044 | }); |
| 20045 | } |
| 20046 | |
| 20047 | function defineRefPropWarningGetter(props, displayName) { |
| 20048 | var warnAboutAccessingRef = function () { |