From 5a71cbe7a9e192c23b847be6e0c575b6705f6939 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Mon, 7 Oct 2019 14:06:19 -0700 Subject: [PATCH] Remove unused export Meant to do this in e4b21be but neglected to `git add` the changes. --- .../src/ReactFiberReconciler.js | 1 - .../src/ReactFiberWorkLoop.js | 25 +++---------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberReconciler.js b/packages/react-reconciler/src/ReactFiberReconciler.js index e833740a525f6..2fb1aa5297bfc 100644 --- a/packages/react-reconciler/src/ReactFiberReconciler.js +++ b/packages/react-reconciler/src/ReactFiberReconciler.js @@ -306,7 +306,6 @@ export function updateContainer( } export { - flushRoot, batchedEventUpdates, batchedUpdates, unbatchedUpdates, diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js index 33a868502d4ad..0ff8ebe047699 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js @@ -367,20 +367,6 @@ export function computeExpirationForFiber( return expirationTime; } -let lastUniqueAsyncExpiration = NoWork; -export function computeUniqueAsyncExpiration(): ExpirationTime { - const currentTime = requestCurrentTime(); - let result = computeAsyncExpiration(currentTime); - if (result <= lastUniqueAsyncExpiration) { - // Since we assume the current time monotonically increases, we only hit - // this branch when computeUniqueAsyncExpiration is fired multiple times - // within a 200ms window (or whatever the async bucket size is). - result -= 1; - } - lastUniqueAsyncExpiration = result; - return result; -} - export function scheduleUpdateOnFiber( fiber: Fiber, expirationTime: ExpirationTime, @@ -1080,16 +1066,11 @@ function finishSyncRender(root, exitStatus, expirationTime) { } export function flushRoot(root: FiberRoot, expirationTime: ExpirationTime) { - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { - invariant( - false, - 'work.commit(): Cannot commit while already rendering. This likely ' + - 'means you attempted to commit from inside a lifecycle method.', - ); - } markRootExpiredAtTime(root, expirationTime); ensureRootIsScheduled(root); - flushSyncCallbackQueue(); + if ((executionContext & (RenderContext | CommitContext)) === NoContext) { + flushSyncCallbackQueue(); + } } export function flushDiscreteUpdates() {