MCPcopy
hub / github.com/facebook/react / useFiber

Function useFiber

packages/react-reconciler/src/ReactChildFiber.js:483–490  ·  view source on GitHub ↗
(fiber: Fiber, pendingProps: mixed)

Source from the content-addressed store, hash-verified

481 }
482
483 function useFiber(fiber: Fiber, pendingProps: mixed): Fiber {
484 // We currently set sibling to null and index to 0 here because it is easy
485 // to forget to do before returning it. E.g. for the single child case.
486 const clone = createWorkInProgress(fiber, pendingProps);
487 clone.index = 0;
488 clone.sibling = null;
489 return clone;
490 }
491
492 function placeChild(
493 newFiber: Fiber,

Callers 7

updateTextNodeFunction · 0.85
updateElementFunction · 0.85
updatePortalFunction · 0.85
updateFragmentFunction · 0.85
reconcileSingleTextNodeFunction · 0.85
reconcileSingleElementFunction · 0.85
reconcileSinglePortalFunction · 0.85

Calls 1

createWorkInProgressFunction · 0.90

Tested by

no test coverage detected