File tree Expand file tree Collapse file tree 3 files changed +5
-66
lines changed
react-devtools-shared/src/devtools/views/Components
react-devtools-shell/src/app Expand file tree Collapse file tree 3 files changed +5
-66
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,8 @@ import {
34
34
useMemo ,
35
35
useReducer ,
36
36
useRef ,
37
+ unstable_startTransition as startTransition ,
37
38
} from 'react' ;
38
- import {
39
- unstable_next as next ,
40
- unstable_runWithPriority as runWithPriority ,
41
- unstable_UserBlockingPriority as UserBlockingPriority ,
42
- } from 'scheduler' ;
43
39
import { createRegExp } from '../utils' ;
44
40
import { BridgeContext , StoreContext } from '../context' ;
45
41
import Store from '../../store' ;
@@ -923,11 +919,10 @@ function TreeContextController({
923
919
924
920
const dispatchWrapper = useCallback (
925
921
( action : Action ) => {
926
- // Run the first update at "user-blocking" priority in case dispatch is called from a non-React event.
927
- // In this case, the current (and "next") priorities would both be "normal",
928
- // and suspense would potentially block both updates.
929
- runWithPriority ( UserBlockingPriority , ( ) => dispatch ( action ) ) ;
930
- next ( ( ) => dispatch ( { type : 'UPDATE_INSPECTED_ELEMENT_ID' } ) ) ;
922
+ dispatch ( action ) ;
923
+ startTransition ( ( ) => {
924
+ dispatch ( { type : 'UPDATE_INSPECTED_ELEMENT_ID' } ) ;
925
+ } ) ;
931
926
} ,
932
927
[ dispatch ] ,
933
928
) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import Hydration from './Hydration';
15
15
import InlineWarnings from './InlineWarnings' ;
16
16
import InspectableElements from './InspectableElements' ;
17
17
import InteractionTracing from './InteractionTracing' ;
18
- import PriorityLevels from './PriorityLevels' ;
19
18
import ReactNativeWeb from './ReactNativeWeb' ;
20
19
import ToDoList from './ToDoList' ;
21
20
import Toggle from './Toggle' ;
@@ -55,7 +54,6 @@ function mountTestApp() {
55
54
mountHelper ( ElementTypes ) ;
56
55
mountHelper ( EditableProps ) ;
57
56
mountHelper ( InlineWarnings ) ;
58
- mountHelper ( PriorityLevels ) ;
59
57
mountHelper ( ReactNativeWeb ) ;
60
58
mountHelper ( Toggle ) ;
61
59
mountHelper ( SuspenseTree ) ;
You can’t perform that action at this time.
0 commit comments