MCPcopy Create free account
hub / github.com/microsoft/SandDance / warnAboutAccessingKey

Function warnAboutAccessingKey

docs/external/js/react.development.js:685–693  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

683
684 function defineKeyPropWarningGetter(props, displayName) {
685 var warnAboutAccessingKey = function () {
686 {
687 if (!specialPropKeyWarningShown) {
688 specialPropKeyWarningShown = true;
689
690 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);
691 }
692 }
693 };
694
695 warnAboutAccessingKey.isReactWarning = true;
696 Object.defineProperty(props, 'key', {

Callers

nothing calls this directly

Calls 1

errorFunction · 0.70

Tested by

no test coverage detected