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.
This commit is contained in:
Andrew Clark
2021-03-29 13:20:40 -05:00
committed by GitHub
parent 634cc52e61
commit 64983aab5d
2 changed files with 0 additions and 12 deletions
@@ -49,7 +49,6 @@ import {
markRootMutableRead,
} from './ReactFiberLane.new';
import {
DefaultEventPriority,
ContinuousEventPriority,
getCurrentUpdatePriority,
setCurrentUpdatePriority,
@@ -1712,11 +1711,6 @@ function startTransition(setPending, callback) {
setPending(true);
// TODO: Can remove this. Was only necessary because we used to give
// different behavior to transitions without a config object. Now they are
// all treated the same.
setCurrentUpdatePriority(DefaultEventPriority);
const prevTransition = ReactCurrentBatchConfig.transition;
ReactCurrentBatchConfig.transition = 1;
try {
@@ -49,7 +49,6 @@ import {
markRootMutableRead,
} from './ReactFiberLane.old';
import {
DefaultEventPriority,
ContinuousEventPriority,
getCurrentUpdatePriority,
setCurrentUpdatePriority,
@@ -1712,11 +1711,6 @@ function startTransition(setPending, callback) {
setPending(true);
// TODO: Can remove this. Was only necessary because we used to give
// different behavior to transitions without a config object. Now they are
// all treated the same.
setCurrentUpdatePriority(DefaultEventPriority);
const prevTransition = ReactCurrentBatchConfig.transition;
ReactCurrentBatchConfig.transition = 1;
try {