* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding * DOM node.
(inst)
| 1814 | * DOM node. |
| 1815 | */ |
| 1816 | function getNodeFromInstance$1(inst) { |
| 1817 | if (inst.tag === HostComponent || inst.tag === HostText) { |
| 1818 | // In Fiber this, is just the state node right now. We assume it will be |
| 1819 | // a host component or host text. |
| 1820 | return inst.stateNode; |
| 1821 | } |
| 1822 | |
| 1823 | // Without this first invariant, passing a non-DOM-component triggers the next |
| 1824 | // invariant for a missing parent, which is super confusing. |
| 1825 | invariant(false, 'getNodeFromInstance: Invalid argument.'); |
| 1826 | } |
| 1827 | |
| 1828 | function getFiberCurrentPropsFromNode$1(node) { |
| 1829 | return node[internalEventHandlersKey] || null; |
no test coverage detected