(component, methodName)
| 20259 | } |
| 20260 | |
| 20261 | function findHostInstanceWithWarning(component, methodName) { |
| 20262 | { |
| 20263 | var fiber = get(component); |
| 20264 | if (fiber === undefined) { |
| 20265 | if (typeof component.render === 'function') { |
| 20266 | invariant(false, 'Unable to find node on an unmounted component.'); |
| 20267 | } else { |
| 20268 | invariant(false, 'Argument appears to not be a ReactComponent. Keys: %s', Object.keys(component)); |
| 20269 | } |
| 20270 | } |
| 20271 | var hostFiber = findCurrentHostFiber(fiber); |
| 20272 | if (hostFiber === null) { |
| 20273 | return null; |
| 20274 | } |
| 20275 | if (hostFiber.mode & StrictMode) { |
| 20276 | var componentName = getComponentName(fiber.type) || 'Component'; |
| 20277 | if (!didWarnAboutFindNodeInStrictMode[componentName]) { |
| 20278 | didWarnAboutFindNodeInStrictMode[componentName] = true; |
| 20279 | if (fiber.mode & StrictMode) { |
| 20280 | warningWithoutStack$1(false, '%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-find-node', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber)); |
| 20281 | } else { |
| 20282 | warningWithoutStack$1(false, '%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-find-node', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber)); |
| 20283 | } |
| 20284 | } |
| 20285 | } |
| 20286 | return hostFiber.stateNode; |
| 20287 | } |
| 20288 | return findHostInstance(component); |
| 20289 | } |
| 20290 | |
| 20291 | function createContainer(containerInfo, isConcurrent, hydrate) { |
| 20292 | return createFiberRoot(containerInfo, isConcurrent, hydrate); |
no test coverage detected