Skip to content

Commit 7d58742

Browse files
committed
fix[devtools/useMemoCache]: add stub for useMemoCache in ReactDebugHook (#27472)
Currently, we have this error in our logs of the internal version of React DevTools: ``` TypeError: Cannot read properties of undefined (reading 'memoCache') at Proxy.useMemoCache (chrome-extension://dnjnjgbfilfphmojnmhliehogmojhclc/build/react_devtools_backend_compact.js:151:71) ``` Looking at the build files of the extension, it fails here: https://github.com/facebook/react/blob/dddfe688206dafa5646550d351eb9a8e9c53654a/packages/react-debug-tools/src/ReactDebugHooks.js#L333-L337 Looks like `updateQueue` can be `undefined`, as it is not defined in hook object here: https://github.com/facebook/react/blob/dddfe688206dafa5646550d351eb9a8e9c53654a/packages/react-reconciler/src/ReactFiberHooks.js#L180-L186 ~~Also, it looks like `useMemoCache` implementation doesn't expect this, so it should also result into TypeError here, line 1114:~~ https://github.com/facebook/react/blob/dddfe688206dafa5646550d351eb9a8e9c53654a/packages/react-reconciler/src/ReactFiberHooks.js#L1108-L1115 ~~Should this also be updated?~~ DiffTrain build for commit a419575.
1 parent 8d3e7a7 commit 7d58742

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24878,7 +24878,7 @@ function createFiberRoot(
2487824878
return root;
2487924879
}
2488024880

24881-
var ReactVersion = "18.3.0-canary-75c1bd7ee-20231017";
24881+
var ReactVersion = "18.3.0-canary-a41957507-20231017";
2488224882

2488324883
// Might add PROFILE later.
2488424884

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9022,7 +9022,7 @@ var devToolsConfig$jscomp$inline_1031 = {
90229022
throw Error("TestRenderer does not support findFiberByHostInstance()");
90239023
},
90249024
bundleType: 0,
9025-
version: "18.3.0-canary-75c1bd7ee-20231017",
9025+
version: "18.3.0-canary-a41957507-20231017",
90269026
rendererPackageName: "react-test-renderer"
90279027
};
90289028
var internals$jscomp$inline_1224 = {
@@ -9053,7 +9053,7 @@ var internals$jscomp$inline_1224 = {
90539053
scheduleRoot: null,
90549054
setRefreshHandler: null,
90559055
getCurrentFiber: null,
9056-
reconcilerVersion: "18.3.0-canary-75c1bd7ee-20231017"
9056+
reconcilerVersion: "18.3.0-canary-a41957507-20231017"
90579057
};
90589058
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
90599059
var hook$jscomp$inline_1225 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9448,7 +9448,7 @@ var devToolsConfig$jscomp$inline_1073 = {
94489448
throw Error("TestRenderer does not support findFiberByHostInstance()");
94499449
},
94509450
bundleType: 0,
9451-
version: "18.3.0-canary-75c1bd7ee-20231017",
9451+
version: "18.3.0-canary-a41957507-20231017",
94529452
rendererPackageName: "react-test-renderer"
94539453
};
94549454
var internals$jscomp$inline_1265 = {
@@ -9479,7 +9479,7 @@ var internals$jscomp$inline_1265 = {
94799479
scheduleRoot: null,
94809480
setRefreshHandler: null,
94819481
getCurrentFiber: null,
9482-
reconcilerVersion: "18.3.0-canary-75c1bd7ee-20231017"
9482+
reconcilerVersion: "18.3.0-canary-a41957507-20231017"
94839483
};
94849484
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
94859485
var hook$jscomp$inline_1266 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-canary-75c1bd7ee-20231017";
30+
var ReactVersion = "18.3.0-canary-a41957507-20231017";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,4 +580,4 @@ exports.useSyncExternalStore = function (
580580
exports.useTransition = function () {
581581
return ReactCurrentDispatcher.current.useTransition();
582582
};
583-
exports.version = "18.3.0-canary-75c1bd7ee-20231017";
583+
exports.version = "18.3.0-canary-a41957507-20231017";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ exports.useSyncExternalStore = function (
583583
exports.useTransition = function () {
584584
return ReactCurrentDispatcher.current.useTransition();
585585
};
586-
exports.version = "18.3.0-canary-75c1bd7ee-20231017";
586+
exports.version = "18.3.0-canary-a41957507-20231017";
587587

588588
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
589589
if (
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
75c1bd7ee7e4a87a4dd0f560e157c57957ef823b
1+
a4195750779dbd9a13e1615fbbd493bf2c5768ca

0 commit comments

Comments
 (0)