* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding * DOM node.
(inst)
| 2484 | * DOM node. |
| 2485 | */ |
| 2486 | function getNodeFromInstance$1(inst) { |
| 2487 | if (inst.tag === HostComponent || inst.tag === HostText) { |
| 2488 | // In Fiber this, is just the state node right now. We assume it will be |
| 2489 | // a host component or host text. |
| 2490 | return inst.stateNode; |
| 2491 | } |
| 2492 | |
| 2493 | // Without this first invariant, passing a non-DOM-component triggers the next |
| 2494 | // invariant for a missing parent, which is super confusing. |
| 2495 | invariant(false, 'getNodeFromInstance: Invalid argument.'); |
| 2496 | } |
| 2497 | |
| 2498 | function getFiberCurrentPropsFromNode$1(node) { |
| 2499 | return node[internalEventHandlersKey] || null; |
no test coverage detected