* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding * DOM node.
(inst)
| 2577 | * DOM node. |
| 2578 | */ |
| 2579 | function getNodeFromInstance$1(inst) { |
| 2580 | if (inst.tag === HostComponent || inst.tag === HostText) { |
| 2581 | // In Fiber this, is just the state node right now. We assume it will be |
| 2582 | // a host component or host text. |
| 2583 | return inst.stateNode; |
| 2584 | } |
| 2585 | |
| 2586 | // Without this first invariant, passing a non-DOM-component triggers the next |
| 2587 | // invariant for a missing parent, which is super confusing. |
| 2588 | invariant(false, 'getNodeFromInstance: Invalid argument.'); |
| 2589 | } |
| 2590 | |
| 2591 | function getFiberCurrentPropsFromNode$1(node) { |
| 2592 | return node[internalEventHandlersKey] || null; |
no test coverage detected