MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / hasValidRef

Function hasValidRef

code/controlled-uncontrolled/public/app.js:17989–17999  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

17987var specialPropRefWarningShown = void 0;
17988
17989function hasValidRef(config) {
17990 {
17991 if (hasOwnProperty.call(config, 'ref')) {
17992 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
17993 if (getter && getter.isReactWarning) {
17994 return false;
17995 }
17996 }
17997 }
17998 return config.ref !== undefined;
17999}
18000
18001function hasValidKey(config) {
18002 {

Callers 2

createElementFunction · 0.70
cloneElementFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected