MCPcopy Index your code
hub / github.com/caseywebdev/react-list / defineKeyPropWarningGetter

Function defineKeyPropWarningGetter

docs/index.js:1007–1021  ·  view source on GitHub ↗
(props, displayName)

Source from the content-addressed store, hash-verified

1005 return void 0 !== config.key;
1006 }
1007 function defineKeyPropWarningGetter(props, displayName) {
1008 function warnAboutAccessingKey() {
1009 specialPropKeyWarningShown ||
1010 ((specialPropKeyWarningShown = !0),
1011 console.error(
1012 "%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://react.dev/link/special-props)",
1013 displayName
1014 ));
1015 }
1016 warnAboutAccessingKey.isReactWarning = !0;
1017 Object.defineProperty(props, "key", {
1018 get: warnAboutAccessingKey,
1019 configurable: !0
1020 });
1021 }
1022 function elementRefGetterWithDeprecationWarning() {
1023 var componentName = getComponentNameFromType(this.type);
1024 didWarnAboutElementRef[componentName] ||

Callers 2

index.jsFile · 0.85
jsxDEVImplFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…