* Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding * DOM node.
(inst)
| 8060 | */ |
| 8061 | |
| 8062 | function getNodeFromInstance$1(inst) { |
| 8063 | if (inst.tag === HostComponent || inst.tag === HostText) { |
| 8064 | // In Fiber this, is just the state node right now. We assume it will be |
| 8065 | // a host component or host text. |
| 8066 | return inst.stateNode; |
| 8067 | } // Without this first invariant, passing a non-DOM-component triggers the next |
| 8068 | // invariant for a missing parent, which is super confusing. |
| 8069 | |
| 8070 | |
| 8071 | { |
| 8072 | { |
| 8073 | throw Error( "getNodeFromInstance: Invalid argument." ); |
| 8074 | } |
| 8075 | } |
| 8076 | } |
| 8077 | function getFiberCurrentPropsFromNode$1(node) { |
| 8078 | return node[internalEventHandlersKey] || null; |
| 8079 | } |
no outgoing calls
no test coverage detected