hasValidKey() — react Function Reference
Architecture documentation for the hasValidKey() function in ReactJSXElement.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 04bd1671_ef17_1a3e_4550_297a31a727d2["hasValidKey()"] 1bf5591f_27a1_c79f_853a_6242549e0e07["ReactJSXElement.js"] 04bd1671_ef17_1a3e_4550_297a31a727d2 -->|defined in| 1bf5591f_27a1_c79f_853a_6242549e0e07 541966e9_c9c6_423b_909d_7502d44146b3["jsxProd()"] 541966e9_c9c6_423b_909d_7502d44146b3 -->|calls| 04bd1671_ef17_1a3e_4550_297a31a727d2 ad281e06_8a7d_3988_f68c_33f816bae40c["jsxDEVImpl()"] ad281e06_8a7d_3988_f68c_33f816bae40c -->|calls| 04bd1671_ef17_1a3e_4550_297a31a727d2 12bdbda4_5438_2837_0178_e722d4b02c99["createElement()"] 12bdbda4_5438_2837_0178_e722d4b02c99 -->|calls| 04bd1671_ef17_1a3e_4550_297a31a727d2 e25f8b64_9c1b_41a7_d00a_3663a86ab332["cloneElement()"] e25f8b64_9c1b_41a7_d00a_3663a86ab332 -->|calls| 04bd1671_ef17_1a3e_4550_297a31a727d2 style 04bd1671_ef17_1a3e_4550_297a31a727d2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react/src/jsx/ReactJSXElement.js lines 109–119
function hasValidKey(config) {
if (__DEV__) {
if (hasOwnProperty.call(config, 'key')) {
const getter = Object.getOwnPropertyDescriptor(config, 'key').get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.key !== undefined;
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does hasValidKey() do?
hasValidKey() is a function in the react codebase, defined in packages/react/src/jsx/ReactJSXElement.js.
Where is hasValidKey() defined?
hasValidKey() is defined in packages/react/src/jsx/ReactJSXElement.js at line 109.
What calls hasValidKey()?
hasValidKey() is called by 4 function(s): cloneElement, createElement, jsxDEVImpl, jsxProd.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free