* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding * DOM node.
(inst)
| 2519 | * DOM node. |
| 2520 | */ |
| 2521 | function getNodeFromInstance$1(inst) { |
| 2522 | if (inst.tag === HostComponent || inst.tag === HostText) { |
| 2523 | // In Fiber this, is just the state node right now. We assume it will be |
| 2524 | // a host component or host text. |
| 2525 | return inst.stateNode; |
| 2526 | } |
| 2527 | |
| 2528 | // Without this first invariant, passing a non-DOM-component triggers the next |
| 2529 | // invariant for a missing parent, which is super confusing. |
| 2530 | invariant(false, 'getNodeFromInstance: Invalid argument.'); |
| 2531 | } |
| 2532 | |
| 2533 | function getFiberCurrentPropsFromNode$1(node) { |
| 2534 | return node[internalEventHandlersKey] || null; |
no test coverage detected