MCPcopy Index your code
hub / github.com/plotly/dash / warnIfStringRefCannotBeAutoConverted

Function warnIfStringRefCannotBeAutoConverted

dash/deps/react@16.14.0.js:720–732  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

718 }
719
720 function warnIfStringRefCannotBeAutoConverted(config) {
721 {
722 if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
723 var componentName = getComponentName(ReactCurrentOwner.current.type);
724
725 if (!didWarnAboutStringRefs[componentName]) {
726 error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
727
728 didWarnAboutStringRefs[componentName] = true;
729 }
730 }
731 }
732 }
733 /**
734 * Factory method to create a new React element. This no longer adheres to
735 * the class pattern, so do not use new to call it. Also, instanceof check

Callers 1

createElementFunction · 0.70

Calls 2

getComponentNameFunction · 0.70
errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…