MCPcopy Index your code
hub / github.com/react/react / createFiberFromPortal

Function createFiberFromPortal

packages/react-reconciler/src/ReactFiber.js:920–934  ·  view source on GitHub ↗
(
  portal: ReactPortal,
  mode: TypeOfMode,
  lanes: Lanes,
)

Source from the content-addressed store, hash-verified

918}
919
920export function createFiberFromPortal(
921 portal: ReactPortal,
922 mode: TypeOfMode,
923 lanes: Lanes,
924): Fiber {
925 const pendingProps = portal.children !== null ? portal.children : [];
926 const fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
927 fiber.lanes = lanes;
928 fiber.stateNode = {
929 containerInfo: portal.containerInfo,
930 pendingChildren: null, // Used by persistent updates
931 implementation: portal.implementation,
932 };
933 return fiber;
934}
935
936export function createFiberFromThrow(
937 error: mixed,

Callers 3

updatePortalFunction · 0.90
createChildFunction · 0.90
reconcileSinglePortalFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected