* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding * DOM node.
(inst)
| 1845 | * DOM node. |
| 1846 | */ |
| 1847 | function getNodeFromInstance$1(inst) { |
| 1848 | if (inst.tag === HostComponent || inst.tag === HostText) { |
| 1849 | // In Fiber this, is just the state node right now. We assume it will be |
| 1850 | // a host component or host text. |
| 1851 | return inst.stateNode; |
| 1852 | } |
| 1853 | |
| 1854 | // Without this first invariant, passing a non-DOM-component triggers the next |
| 1855 | // invariant for a missing parent, which is super confusing. |
| 1856 | invariant(false, 'getNodeFromInstance: Invalid argument.'); |
| 1857 | } |
| 1858 | |
| 1859 | function getFiberCurrentPropsFromNode$1(node) { |
| 1860 | return node[internalEventHandlersKey] || null; |
no test coverage detected