MCPcopy Index your code
hub / github.com/microsoft/SandDance / defineKeyPropWarningGetter

Function defineKeyPropWarningGetter

docs/external/js/react.development.js:684–700  ·  view source on GitHub ↗
(props, displayName)

Source from the content-addressed store, hash-verified

682 }
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', {
697 get: warnAboutAccessingKey,
698 configurable: true
699 });
700 }
701
702 function defineRefPropWarningGetter(props, displayName) {
703 var warnAboutAccessingRef = function () {

Callers 1

createElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected