File tree Expand file tree Collapse file tree
react-devtools-shared/src/devtools/views/Components
react-devtools-shell/src/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,12 +34,8 @@ import {
3434 useMemo ,
3535 useReducer ,
3636 useRef ,
37+ unstable_startTransition as startTransition ,
3738} from 'react' ;
38- import {
39- unstable_next as next ,
40- unstable_runWithPriority as runWithPriority ,
41- unstable_UserBlockingPriority as UserBlockingPriority ,
42- } from 'scheduler' ;
4339import { createRegExp } from '../utils' ;
4440import { BridgeContext , StoreContext } from '../context' ;
4541import Store from '../../store' ;
@@ -923,11 +919,10 @@ function TreeContextController({
923919
924920 const dispatchWrapper = useCallback (
925921 ( 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+ } ) ;
931926 } ,
932927 [ dispatch ] ,
933928 ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import Hydration from './Hydration';
1515import InlineWarnings from './InlineWarnings' ;
1616import InspectableElements from './InspectableElements' ;
1717import InteractionTracing from './InteractionTracing' ;
18- import PriorityLevels from './PriorityLevels' ;
1918import ReactNativeWeb from './ReactNativeWeb' ;
2019import ToDoList from './ToDoList' ;
2120import Toggle from './Toggle' ;
@@ -55,7 +54,6 @@ function mountTestApp() {
5554 mountHelper ( ElementTypes ) ;
5655 mountHelper ( EditableProps ) ;
5756 mountHelper ( InlineWarnings ) ;
58- mountHelper ( PriorityLevels ) ;
5957 mountHelper ( ReactNativeWeb ) ;
6058 mountHelper ( Toggle ) ;
6159 mountHelper ( SuspenseTree ) ;
You can’t perform that action at this time.
0 commit comments