mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user