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

Function updateFragment

bundle.js:7109–7111  ·  view source on GitHub ↗
(returnFiber,current,fragment,priority)

Source from the content-addressed store, hash-verified

7107var existing=useFiber(current,priority);existing.type=yieldNode.value;existing['return']=returnFiber;return existing;}}function updatePortal(returnFiber,current,portal,priority){if(current===null||current.tag!==HostPortal$5||current.stateNode.containerInfo!==portal.containerInfo||current.stateNode.implementation!==portal.implementation){// Insert
7108var created=createFiberFromPortal$1(portal,returnFiber.internalContextTag,priority);created['return']=returnFiber;return created;}else{// Update
7109var existing=useFiber(current,priority);existing.pendingProps=portal.children||[];existing['return']=returnFiber;return existing;}}function updateFragment(returnFiber,current,fragment,priority){if(current===null||current.tag!==Fragment$3){// Insert
7110var created=createFiberFromFragment$1(fragment,returnFiber.internalContextTag,priority);created['return']=returnFiber;return created;}else{// Update
7111var existing=useFiber(current,priority);existing.pendingProps=fragment;existing['return']=returnFiber;return existing;}}function createChild(returnFiber,newChild,priority){if(typeof newChild==='string'||typeof newChild==='number'){// Text nodes doesn't have keys. If the previous node is implicitly keyed
7112// we can continue to replace it without aborting even if it is not a text
7113// node.
7114var created=createFiberFromText$1(''+newChild,returnFiber.internalContextTag,priority);created['return']=returnFiber;return created;}if((typeof newChild==='undefined'?'undefined':_typeof(newChild))==='object'&&newChild!==null){switch(newChild.$$typeof){case REACT_ELEMENT_TYPE:{var _created=createFiberFromElement$1(newChild,returnFiber.internalContextTag,priority);_created.ref=coerceRef(null,newChild);_created['return']=returnFiber;return _created;}case REACT_COROUTINE_TYPE:{var _created2=createFiberFromCoroutine$1(newChild,returnFiber.internalContextTag,priority);_created2['return']=returnFiber;return _created2;}case REACT_YIELD_TYPE:{var _created3=createFiberFromYield$1(newChild,returnFiber.internalContextTag,priority);_created3.type=newChild.value;_created3['return']=returnFiber;return _created3;}case REACT_PORTAL_TYPE:{var _created4=createFiberFromPortal$1(newChild,returnFiber.internalContextTag,priority);_created4['return']=returnFiber;return _created4;}}if(isArray(newChild)||getIteratorFn(newChild)){var _created5=createFiberFromFragment$1(newChild,returnFiber.internalContextTag,priority);_created5['return']=returnFiber;return _created5;}throwOnInvalidObjectType(returnFiber,newChild);}{if(typeof newChild==='function'){warnOnFunctionType();}}return null;}function updateSlot(returnFiber,oldFiber,newChild,priority){// Update the fiber if the keys match, otherwise return null.

Callers 3

updateSlotFunction · 0.85
updateFromMapFunction · 0.85
beginWorkFunction · 0.85

Calls 4

useFiberFunction · 0.85
reconcileChildrenFunction · 0.85
memoizePropsFunction · 0.85

Tested by

no test coverage detected