MCPcopy Create free account
hub / github.com/danielstocks/react-sortable / getRenderedHostOrTextFromComponent

Function getRenderedHostOrTextFromComponent

bundle.js:5613–5613  ·  view source on GitHub ↗

* Drill down (through composites and empty components) until we get a host or * host text component. * * This is pretty polymorphic but unavoidable with the current structure we have * for `_renderedChildren`.

(component)

Source from the content-addressed store, hash-verified

5611 * This is pretty polymorphic but unavoidable with the current structure we have
5612 * for `_renderedChildren`.
5613 */function getRenderedHostOrTextFromComponent(component){var rendered;while(rendered=component._renderedComponent){component=rendered;}return component;}/**
5614 * Populate `_hostNode` on the rendered host/text component with the given
5615 * DOM node. The passed `inst` can be a composite.
5616 */function precacheNode(inst,node){var hostInst=getRenderedHostOrTextFromComponent(inst);hostInst._hostNode=node;node[internalInstanceKey]=hostInst;}function precacheFiberNode$1(hostInst,node){node[internalInstanceKey]=hostInst;}function uncacheNode(inst){var node=inst._hostNode;if(node){delete node[internalInstanceKey];inst._hostNode=null;}}/**

Callers 2

precacheNodeFunction · 0.85
precacheChildNodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected