MCPcopy Create free account
hub / github.com/reactjs/react-rails / warnAboutAccessingKey

Function warnAboutAccessingKey

lib/assets/react-source/development/react.js:991–999  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

989
990 function defineKeyPropWarningGetter(props, displayName) {
991 var warnAboutAccessingKey = function () {
992 {
993 if (!specialPropKeyWarningShown) {
994 specialPropKeyWarningShown = true;
995
996 error('%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);
997 }
998 }
999 };
1000
1001 warnAboutAccessingKey.isReactWarning = true;
1002 Object.defineProperty(props, 'key', {

Callers

nothing calls this directly

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected