Skip to content

Commit

Permalink
Remove redundant setUpdatePriority call (facebook#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 and koto committed Jun 15, 2021
1 parent 65dd6b3 commit 9ce9b6f
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 9ce9b6f

Please sign in to comment.