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 committed Apr 16, 2021
1 parent d669925 commit 3b7b3fe
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 3b7b3fe

Please sign in to comment.