(config)
| 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 |
no test coverage detected
searching dependent graphs…