@samitouri / QOS-React-2 / commits / 64983aab5d

Remove redundant setUpdatePriority call (#21127)

See removed TODO comment. This call is no longer necessary because we use the dispatcher to track whether we're inside a transition, not the event priority.

Andrew Clark committed Mar 29, 2021 at 13:20 UTC 64983aab5d4dbd99ca06bb85e69bb193928ea0c7
2 files changed -12
packages/react-reconciler/src/ReactFiberHooks.new.js
-6
@@ -49,7 +49,6 @@ import {
49 markRootMutableRead,
50 } from './ReactFiberLane.new';
51 import {
52 - DefaultEventPriority,
52 ContinuousEventPriority,
53 getCurrentUpdatePriority,
54 setCurrentUpdatePriority,
@@ -1712,11 +1711,6 @@ function startTransition(setPending, callback) {
1711
1712 setPending(true);
1713
1715 - // TODO: Can remove this. Was only necessary because we used to give
1716 - // different behavior to transitions without a config object. Now they are
1717 - // all treated the same.
1718 - setCurrentUpdatePriority(DefaultEventPriority);
1719 -
1714 const prevTransition = ReactCurrentBatchConfig.transition;
1715 ReactCurrentBatchConfig.transition = 1;
1716 try {
packages/react-reconciler/src/ReactFiberHooks.old.js
-6
@@ -49,7 +49,6 @@ import {
49 markRootMutableRead,
50 } from './ReactFiberLane.old';
51 import {
52 - DefaultEventPriority,
52 ContinuousEventPriority,
53 getCurrentUpdatePriority,
54 setCurrentUpdatePriority,
@@ -1712,11 +1711,6 @@ function startTransition(setPending, callback) {
1711
1712 setPending(true);
1713
1715 - // TODO: Can remove this. Was only necessary because we used to give
1716 - // different behavior to transitions without a config object. Now they are
1717 - // all treated the same.
1718 - setCurrentUpdatePriority(DefaultEventPriority);
1719 -
1714 const prevTransition = ReactCurrentBatchConfig.transition;
1715 ReactCurrentBatchConfig.transition = 1;
1716 try {