We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12627f9 commit 9aca239Copy full SHA for 9aca239
packages/react-refresh/src/ReactFreshRuntime.js
@@ -465,6 +465,17 @@ export function injectIntoGlobalHook(globalObject: any): void {
465
};
466
}
467
468
+ if (hook.isDisabled) {
469
+ // This isn't a real property on the hook, but it can be set to opt out
470
+ // of DevTools integration and associated warnings and logs.
471
+ // Using console['warn'] to evade Babel and ESLint
472
+ console['warn'](
473
+ 'Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). ' +
474
+ 'Fast Refresh is not compatible with this shim and will be disabled.',
475
+ );
476
+ return;
477
+ }
478
+
479
// Here, we just want to get a reference to scheduleRefresh.
480
const oldInject = hook.inject;
481
hook.inject = function(injected) {
0 commit comments