* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding * DOM node.
(inst)
| 1717 | * DOM node. |
| 1718 | */ |
| 1719 | function getNodeFromInstance$1(inst) { |
| 1720 | if (inst.tag === HostComponent || inst.tag === HostText) { |
| 1721 | // In Fiber this, is just the state node right now. We assume it will be |
| 1722 | // a host component or host text. |
| 1723 | return inst.stateNode; |
| 1724 | } |
| 1725 | |
| 1726 | // Without this first invariant, passing a non-DOM-component triggers the next |
| 1727 | // invariant for a missing parent, which is super confusing. |
| 1728 | invariant(false, 'getNodeFromInstance: Invalid argument.'); |
| 1729 | } |
| 1730 | |
| 1731 | function getFiberCurrentPropsFromNode$1(node) { |
| 1732 | return node[internalEventHandlersKey] || null; |
no test coverage detected