Skip to content

Commit 3a9249d

Browse files
committed
Remove redundant setUpdatePriority call
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.
1 parent 634cc52 commit 3a9249d

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

packages/react-reconciler/src/ReactFiberHooks.new.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import {
4949
markRootMutableRead,
5050
} from './ReactFiberLane.new';
5151
import {
52-
DefaultEventPriority,
5352
ContinuousEventPriority,
5453
getCurrentUpdatePriority,
5554
setCurrentUpdatePriority,
@@ -1712,11 +1711,6 @@ function startTransition(setPending, callback) {
17121711

17131712
setPending(true);
17141713

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-
17201714
const prevTransition = ReactCurrentBatchConfig.transition;
17211715
ReactCurrentBatchConfig.transition = 1;
17221716
try {

packages/react-reconciler/src/ReactFiberHooks.old.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import {
4949
markRootMutableRead,
5050
} from './ReactFiberLane.old';
5151
import {
52-
DefaultEventPriority,
5352
ContinuousEventPriority,
5453
getCurrentUpdatePriority,
5554
setCurrentUpdatePriority,
@@ -1712,11 +1711,6 @@ function startTransition(setPending, callback) {
17121711

17131712
setPending(true);
17141713

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-
17201714
const prevTransition = ReactCurrentBatchConfig.transition;
17211715
ReactCurrentBatchConfig.transition = 1;
17221716
try {

0 commit comments

Comments
 (0)