@@ -37,7 +37,7 @@ import {
37
37
} from 'shared/ReactSymbols' ;
38
38
import hasOwnProperty from 'shared/hasOwnProperty' ;
39
39
40
- type CurrentDispatcherRef = typeof ReactSharedInternals . ReactCurrentDispatcher ;
40
+ type CurrentDispatcherRef = typeof ReactSharedInternals ;
41
41
42
42
// Used to track hooks called during a render
43
43
@@ -1075,11 +1075,11 @@ export function inspectHooks<Props>(
1075
1075
// DevTools will pass the current renderer's injected dispatcher.
1076
1076
// Other apps might compile debug hooks as part of their app though.
1077
1077
if ( currentDispatcher == null ) {
1078
- currentDispatcher = ReactSharedInternals . ReactCurrentDispatcher ;
1078
+ currentDispatcher = ReactSharedInternals ;
1079
1079
}
1080
1080
1081
- const previousDispatcher = currentDispatcher.current ;
1082
- currentDispatcher.current = DispatcherProxy;
1081
+ const previousDispatcher = currentDispatcher.H ;
1082
+ currentDispatcher.H = DispatcherProxy;
1083
1083
1084
1084
let readHookLog;
1085
1085
let ancestorStackError;
@@ -1093,7 +1093,7 @@ export function inspectHooks<Props>(
1093
1093
readHookLog = hookLog ;
1094
1094
hookLog = [ ] ;
1095
1095
// $FlowFixMe[incompatible-use] found when upgrading Flow
1096
- currentDispatcher . current = previousDispatcher ;
1096
+ currentDispatcher . H = previousDispatcher ;
1097
1097
}
1098
1098
const rootStack = ErrorStackParser.parse(ancestorStackError);
1099
1099
return buildTree(rootStack, readHookLog);
@@ -1129,9 +1129,9 @@ function inspectHooksOfForwardRef<Props, Ref>(
1129
1129
ref : Ref ,
1130
1130
currentDispatcher : CurrentDispatcherRef ,
1131
1131
) : HooksTree {
1132
- const previousDispatcher = currentDispatcher . current ;
1132
+ const previousDispatcher = currentDispatcher . H ;
1133
1133
let readHookLog ;
1134
- currentDispatcher . current = DispatcherProxy ;
1134
+ currentDispatcher . H = DispatcherProxy ;
1135
1135
let ancestorStackError ;
1136
1136
try {
1137
1137
ancestorStackError = new Error ( ) ;
@@ -1141,7 +1141,7 @@ function inspectHooksOfForwardRef<Props, Ref>(
1141
1141
} finally {
1142
1142
readHookLog = hookLog ;
1143
1143
hookLog = [ ] ;
1144
- currentDispatcher . current = previousDispatcher ;
1144
+ currentDispatcher . H = previousDispatcher ;
1145
1145
}
1146
1146
const rootStack = ErrorStackParser.parse(ancestorStackError);
1147
1147
return buildTree(rootStack, readHookLog);
@@ -1169,7 +1169,7 @@ export function inspectHooksOfFiber(
1169
1169
// DevTools will pass the current renderer's injected dispatcher.
1170
1170
// Other apps might compile debug hooks as part of their app though.
1171
1171
if ( currentDispatcher == null ) {
1172
- currentDispatcher = ReactSharedInternals . ReactCurrentDispatcher ;
1172
+ currentDispatcher = ReactSharedInternals ;
1173
1173
}
1174
1174
1175
1175
if (
0 commit comments