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

Function hasValidRef

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

Source from the content-addressed store, hash-verified

86}
87
88function hasValidRef(config) {
89 if (__DEV__) {
90 if (hasOwnProperty.call(config, 'ref')) {
91 const getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
92 if (getter && getter.isReactWarning) {
93 return false;
94 }
95 }
96 }
97 return config.ref !== undefined;
98}
99
100function hasValidKey(config) {
101 if (__DEV__) {

Callers 1

cloneElementFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected