MCPcopy
hub / github.com/facebook/react / hasValidKey

Function hasValidKey

packages/react/src/jsx/ReactJSXElement.js:100–110  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

98}
99
100function hasValidKey(config) {
101 if (__DEV__) {
102 if (hasOwnProperty.call(config, 'key')) {
103 const getter = Object.getOwnPropertyDescriptor(config, 'key').get;
104 if (getter && getter.isReactWarning) {
105 return false;
106 }
107 }
108 }
109 return config.key !== undefined;
110}
111
112function defineKeyPropWarningGetter(props, displayName) {
113 if (__DEV__) {

Callers 4

jsxProdFunction · 0.70
jsxDEVImplFunction · 0.70
createElementFunction · 0.70
cloneElementFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected