MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / createFiberRoot

Function createFiberRoot

code/new-context-api/public/app.js:6449–6468  ·  view source on GitHub ↗
(containerInfo, isAsync, hydrate)

Source from the content-addressed store, hash-verified

6447
6448
6449function createFiberRoot(containerInfo, isAsync, hydrate) {
6450 // Cyclic construction. This cheats the type system right now because
6451 // stateNode is any.
6452 var uninitializedFiber = createHostRootFiber(isAsync);
6453 var root = {
6454 current: uninitializedFiber,
6455 containerInfo: containerInfo,
6456 pendingChildren: null,
6457 pendingCommitExpirationTime: NoWork,
6458 finishedWork: null,
6459 context: null,
6460 pendingContext: null,
6461 hydrate: hydrate,
6462 remainingExpirationTime: NoWork,
6463 firstBatch: null,
6464 nextScheduledRoot: null
6465 };
6466 uninitializedFiber.stateNode = root;
6467 return root;
6468}
6469
6470var onCommitFiberRoot = null;
6471var onCommitFiberUnmount = null;

Callers 1

ReactFiberReconciler$1Function · 0.70

Calls 1

createHostRootFiberFunction · 0.70

Tested by

no test coverage detected