@samitouri / QOS-React-2 / commits / 5a71cbe7a9

Remove unused export

Meant to do this in e4b21be but neglected to `git add` the changes.

Andrew Clark committed Oct 7, 2019 at 14:06 UTC 5a71cbe7a9e192c23b847be6e0c575b6705f6939
2 files changed +3 -23
packages/react-reconciler/src/ReactFiberReconciler.js
-1
@@ -306,7 +306,6 @@ export function updateContainer(
306 }
307
308 export {
309 - flushRoot,
309 batchedEventUpdates,
310 batchedUpdates,
311 unbatchedUpdates,
packages/react-reconciler/src/ReactFiberWorkLoop.js
+3 -22
@@ -367,20 +367,6 @@ export function computeExpirationForFiber(
367 return expirationTime;
368 }
369
370 -let lastUniqueAsyncExpiration = NoWork;
371 -export function computeUniqueAsyncExpiration(): ExpirationTime {
372 - const currentTime = requestCurrentTime();
373 - let result = computeAsyncExpiration(currentTime);
374 - if (result <= lastUniqueAsyncExpiration) {
375 - // Since we assume the current time monotonically increases, we only hit
376 - // this branch when computeUniqueAsyncExpiration is fired multiple times
377 - // within a 200ms window (or whatever the async bucket size is).
378 - result -= 1;
379 - }
380 - lastUniqueAsyncExpiration = result;
381 - return result;
382 -}
383 -
370 export function scheduleUpdateOnFiber(
371 fiber: Fiber,
372 expirationTime: ExpirationTime,
@@ -1080,16 +1066,11 @@ function finishSyncRender(root, exitStatus, expirationTime) {
1066 }
1067
1068 export function flushRoot(root: FiberRoot, expirationTime: ExpirationTime) {
1083 - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
1084 - invariant(
1085 - false,
1086 - 'work.commit(): Cannot commit while already rendering. This likely ' +
1087 - 'means you attempted to commit from inside a lifecycle method.',
1088 - );
1089 - }
1069 markRootExpiredAtTime(root, expirationTime);
1070 ensureRootIsScheduled(root);
1092 - flushSyncCallbackQueue();
1071 + if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
1072 + flushSyncCallbackQueue();
1073 + }
1074 }
1075
1076 export function flushDiscreteUpdates() {