* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding * DOM node.
(inst)
| 2622 | * DOM node. |
| 2623 | */ |
| 2624 | function getNodeFromInstance$1(inst) { |
| 2625 | if (inst.tag === HostComponent || inst.tag === HostText) { |
| 2626 | // In Fiber this, is just the state node right now. We assume it will be |
| 2627 | // a host component or host text. |
| 2628 | return inst.stateNode; |
| 2629 | } |
| 2630 | |
| 2631 | // Without this first invariant, passing a non-DOM-component triggers the next |
| 2632 | // invariant for a missing parent, which is super confusing. |
| 2633 | invariant(false, 'getNodeFromInstance: Invalid argument.'); |
| 2634 | } |
| 2635 | |
| 2636 | function getFiberCurrentPropsFromNode$1(node) { |
| 2637 | return node[internalEventHandlersKey] || null; |
no test coverage detected