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

Function ReactFiberScheduler

code/styling/public/app.js:12683–14017  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

12681}
12682
12683var ReactFiberScheduler = function (config) {
12684 var stack = ReactFiberStack();
12685 var hostContext = ReactFiberHostContext(config, stack);
12686 var legacyContext = ReactFiberLegacyContext(stack);
12687 var newContext = ReactFiberNewContext(stack);
12688 var popHostContext = hostContext.popHostContext,
12689 popHostContainer = hostContext.popHostContainer;
12690 var popTopLevelLegacyContextObject = legacyContext.popTopLevelContextObject,
12691 popLegacyContextProvider = legacyContext.popContextProvider;
12692 var popProvider = newContext.popProvider;
12693
12694 var hydrationContext = ReactFiberHydrationContext(config);
12695
12696 var _ReactFiberBeginWork = ReactFiberBeginWork(config, hostContext, legacyContext, newContext, hydrationContext, scheduleWork, computeExpirationForFiber),
12697 beginWork = _ReactFiberBeginWork.beginWork;
12698
12699 var _ReactFiberCompleteWo = ReactFiberCompleteWork(config, hostContext, legacyContext, newContext, hydrationContext),
12700 completeWork = _ReactFiberCompleteWo.completeWork;
12701
12702 var _ReactFiberUnwindWork = ReactFiberUnwindWork(hostContext, legacyContext, newContext, scheduleWork, isAlreadyFailedLegacyErrorBoundary),
12703 throwException = _ReactFiberUnwindWork.throwException,
12704 unwindWork = _ReactFiberUnwindWork.unwindWork,
12705 unwindInterruptedWork = _ReactFiberUnwindWork.unwindInterruptedWork;
12706
12707 var _ReactFiberCommitWork = ReactFiberCommitWork(config, onCommitPhaseError, scheduleWork, computeExpirationForFiber, markLegacyErrorBoundaryAsFailed, recalculateCurrentTime),
12708 commitResetTextContent = _ReactFiberCommitWork.commitResetTextContent,
12709 commitPlacement = _ReactFiberCommitWork.commitPlacement,
12710 commitDeletion = _ReactFiberCommitWork.commitDeletion,
12711 commitWork = _ReactFiberCommitWork.commitWork,
12712 commitLifeCycles = _ReactFiberCommitWork.commitLifeCycles,
12713 commitErrorLogging = _ReactFiberCommitWork.commitErrorLogging,
12714 commitAttachRef = _ReactFiberCommitWork.commitAttachRef,
12715 commitDetachRef = _ReactFiberCommitWork.commitDetachRef;
12716
12717 var now = config.now,
12718 scheduleDeferredCallback = config.scheduleDeferredCallback,
12719 cancelDeferredCallback = config.cancelDeferredCallback,
12720 prepareForCommit = config.prepareForCommit,
12721 resetAfterCommit = config.resetAfterCommit;
12722
12723 // Represents the current time in ms.
12724
12725 var originalStartTimeMs = now();
12726 var mostRecentCurrentTime = msToExpirationTime(0);
12727 var mostRecentCurrentTimeMs = originalStartTimeMs;
12728
12729 // Used to ensure computeUniqueAsyncExpiration is monotonically increases.
12730 var lastUniqueAsyncExpiration = 0;
12731
12732 // Represents the expiration time that incoming updates should use. (If this
12733 // is NoWork, use the default strategy: async updates in async mode, sync
12734 // updates in sync mode.)
12735 var expirationContext = NoWork;
12736
12737 var isWorking = false;
12738
12739 // The next work in progress fiber that we're currently working on.
12740 var nextUnitOfWork = null;

Callers 1

ReactFiberReconciler$1Function · 0.70

Calls 13

ReactFiberStackFunction · 0.70
ReactFiberHostContextFunction · 0.70
ReactFiberLegacyContextFunction · 0.70
ReactFiberNewContextFunction · 0.70
ReactFiberBeginWorkFunction · 0.70
ReactFiberCompleteWorkFunction · 0.70
ReactFiberUnwindWorkFunction · 0.70
ReactFiberCommitWorkFunction · 0.70
msToExpirationTimeFunction · 0.70
popHostContainerFunction · 0.70
popHostContextFunction · 0.70

Tested by

no test coverage detected