(config)
| 678 | } |
| 679 | |
| 680 | function warnIfStringRefCannotBeAutoConverted(config) { |
| 681 | { |
| 682 | if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { |
| 683 | var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); |
| 684 | |
| 685 | if (!didWarnAboutStringRefs[componentName]) { |
| 686 | 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://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); |
| 687 | |
| 688 | didWarnAboutStringRefs[componentName] = true; |
| 689 | } |
| 690 | } |
| 691 | } |
| 692 | } |
| 693 | /** |
| 694 | * Factory method to create a new React element. This no longer adheres to |
| 695 | * the class pattern, so do not use new to call it. Also, instanceof check |
no test coverage detected
searching dependent graphs…