Skip to content

Commit

Permalink
Remove redundant setUpdatePriority call (#21127)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acdlite authored Mar 29, 2021
1 parent 634cc52 commit 64983aa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions packages/react-reconciler/src/ReactFiberHooks.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import {
markRootMutableRead,
} from './ReactFiberLane.new';
import {
DefaultEventPriority,
ContinuousEventPriority,
getCurrentUpdatePriority,
setCurrentUpdatePriority,
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 0 additions & 6 deletions packages/react-reconciler/src/ReactFiberHooks.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import {
markRootMutableRead,
} from './ReactFiberLane.old';
import {
DefaultEventPriority,
ContinuousEventPriority,
getCurrentUpdatePriority,
setCurrentUpdatePriority,
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 64983aa

Please sign in to comment.