@@ -37,7 +37,7 @@ import {
3737} from 'shared/ReactSymbols' ;
3838import hasOwnProperty from 'shared/hasOwnProperty' ;
3939
40- type CurrentDispatcherRef = typeof ReactSharedInternals . ReactCurrentDispatcher ;
40+ type CurrentDispatcherRef = typeof ReactSharedInternals ;
4141
4242// Used to track hooks called during a render
4343
@@ -1075,11 +1075,11 @@ export function inspectHooks<Props>(
10751075 // DevTools will pass the current renderer's injected dispatcher.
10761076 // Other apps might compile debug hooks as part of their app though.
10771077 if ( currentDispatcher == null ) {
1078- currentDispatcher = ReactSharedInternals . ReactCurrentDispatcher ;
1078+ currentDispatcher = ReactSharedInternals ;
10791079 }
10801080
1081- const previousDispatcher = currentDispatcher.current ;
1082- currentDispatcher.current = DispatcherProxy;
1081+ const previousDispatcher = currentDispatcher.H ;
1082+ currentDispatcher.H = DispatcherProxy;
10831083
10841084 let readHookLog;
10851085 let ancestorStackError;
@@ -1093,7 +1093,7 @@ export function inspectHooks<Props>(
10931093 readHookLog = hookLog ;
10941094 hookLog = [ ] ;
10951095 // $FlowFixMe[incompatible-use] found when upgrading Flow
1096- currentDispatcher . current = previousDispatcher ;
1096+ currentDispatcher . H = previousDispatcher ;
10971097 }
10981098 const rootStack = ErrorStackParser.parse(ancestorStackError);
10991099 return buildTree(rootStack, readHookLog);
@@ -1129,9 +1129,9 @@ function inspectHooksOfForwardRef<Props, Ref>(
11291129 ref : Ref ,
11301130 currentDispatcher : CurrentDispatcherRef ,
11311131) : HooksTree {
1132- const previousDispatcher = currentDispatcher . current ;
1132+ const previousDispatcher = currentDispatcher . H ;
11331133 let readHookLog ;
1134- currentDispatcher . current = DispatcherProxy ;
1134+ currentDispatcher . H = DispatcherProxy ;
11351135 let ancestorStackError ;
11361136 try {
11371137 ancestorStackError = new Error ( ) ;
@@ -1141,7 +1141,7 @@ function inspectHooksOfForwardRef<Props, Ref>(
11411141 } finally {
11421142 readHookLog = hookLog ;
11431143 hookLog = [ ] ;
1144- currentDispatcher . current = previousDispatcher ;
1144+ currentDispatcher . H = previousDispatcher ;
11451145 }
11461146 const rootStack = ErrorStackParser.parse(ancestorStackError);
11471147 return buildTree(rootStack, readHookLog);
@@ -1169,7 +1169,7 @@ export function inspectHooksOfFiber(
11691169 // DevTools will pass the current renderer's injected dispatcher.
11701170 // Other apps might compile debug hooks as part of their app though.
11711171 if ( currentDispatcher == null ) {
1172- currentDispatcher = ReactSharedInternals . ReactCurrentDispatcher ;
1172+ currentDispatcher = ReactSharedInternals ;
11731173 }
11741174
11751175 if (
0 commit comments