File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
packages/react-devtools-shared/src Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 99
1010import { unstable_getCacheForType as getCacheForType } from 'react' ;
1111import { enableHookNameParsing } from 'react-devtools-feature-flags' ;
12+ import { __DEBUG__ } from 'react-devtools-shared/src/constants' ;
1213
1314import type { HooksTree } from 'react-debug-tools/src/ReactDebugHooks' ;
1415import type { Thenable , Wakeable } from 'shared/ReactTypes' ;
@@ -108,6 +109,10 @@ export function loadHookNames(
108109 return ;
109110 }
110111
112+ if ( __DEBUG__ ) {
113+ console . log ( '[hookNamesCache] onSuccess() hookNames:' , hookNames ) ;
114+ }
115+
111116 if ( hookNames ) {
112117 const resolvedRecord = ( ( newRecord : any ) : ResolvedRecord < HookNames > ) ;
113118 resolvedRecord . status = Resolved ;
@@ -121,6 +126,10 @@ export function loadHookNames(
121126 wake ( ) ;
122127 } ,
123128 function onError ( error ) {
129+ if ( __DEBUG__ ) {
130+ console . log ( '[hookNamesCache] onError() error:' , error ) ;
131+ }
132+
124133 if ( didTimeout ) {
125134 return ;
126135 }
@@ -134,7 +143,11 @@ export function loadHookNames(
134143 ) ;
135144
136145 // Eventually timeout and stop trying to load names.
137- let timeoutID = setTimeout ( ( ) => {
146+ let timeoutID = setTimeout ( function onTimeout ( ) {
147+ if ( __DEBUG__ ) {
148+ console . log ( '[hookNamesCache] onTimeout()' ) ;
149+ }
150+
138151 timeoutID = null ;
139152
140153 didTimeout = true ;
You can’t perform that action at this time.
0 commit comments