Skip to content

Commit b16431a

Browse files
committed
feat[devtools]: display Forget badge for the relevant components (#27709)
Adds `Forget` badge to all relevant components. Changes: - If component is compiled with Forget and using a built-in `useMemoCache` hook, it will have a `Forget` badge next to its display name in: - components tree - inspected element view - owners list - Such badges are indexable, so Forget components can be searched using search bar. Fixes: - Displaying the badges for owners list inside the inspected component view Implementation: - React DevTools backend is responsible for identifying if component is compiled with Forget, based on `fiber.updateQueue.memoCache`. It will wrap component's display name with `Forget(...)` prefix before passing operations to the frontend. On the frontend side, we will parse the display name and strip Forget prefix, marking the corresponding element by setting `compiledWithForget` field. Almost the same logic is currently used for HOC display names. DiffTrain build for commit 6c7b41d.
1 parent 8bf5ef9 commit b16431a

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -25474,7 +25474,7 @@ if (__DEV__) {
2547425474
return root;
2547525475
}
2547625476

25477-
var ReactVersion = "18.3.0-canary-fbc9b68d6-20231123";
25477+
var ReactVersion = "18.3.0-canary-6c7b41da3-20231123";
2547825478

2547925479
// Might add PROFILE later.
2548025480

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -9083,7 +9083,7 @@ var devToolsConfig$jscomp$inline_1033 = {
90839083
throw Error("TestRenderer does not support findFiberByHostInstance()");
90849084
},
90859085
bundleType: 0,
9086-
version: "18.3.0-canary-fbc9b68d6-20231123",
9086+
version: "18.3.0-canary-6c7b41da3-20231123",
90879087
rendererPackageName: "react-test-renderer"
90889088
};
90899089
var internals$jscomp$inline_1226 = {
@@ -9114,7 +9114,7 @@ var internals$jscomp$inline_1226 = {
91149114
scheduleRoot: null,
91159115
setRefreshHandler: null,
91169116
getCurrentFiber: null,
9117-
reconcilerVersion: "18.3.0-canary-fbc9b68d6-20231123"
9117+
reconcilerVersion: "18.3.0-canary-6c7b41da3-20231123"
91189118
};
91199119
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
91209120
var hook$jscomp$inline_1227 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -9509,7 +9509,7 @@ var devToolsConfig$jscomp$inline_1075 = {
95099509
throw Error("TestRenderer does not support findFiberByHostInstance()");
95109510
},
95119511
bundleType: 0,
9512-
version: "18.3.0-canary-fbc9b68d6-20231123",
9512+
version: "18.3.0-canary-6c7b41da3-20231123",
95139513
rendererPackageName: "react-test-renderer"
95149514
};
95159515
var internals$jscomp$inline_1267 = {
@@ -9540,7 +9540,7 @@ var internals$jscomp$inline_1267 = {
95409540
scheduleRoot: null,
95419541
setRefreshHandler: null,
95429542
getCurrentFiber: null,
9543-
reconcilerVersion: "18.3.0-canary-fbc9b68d6-20231123"
9543+
reconcilerVersion: "18.3.0-canary-6c7b41da3-20231123"
95449544
};
95459545
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
95469546
var hook$jscomp$inline_1268 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if (__DEV__) {
2424
) {
2525
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2626
}
27-
var ReactVersion = "18.3.0-canary-fbc9b68d6-20231123";
27+
var ReactVersion = "18.3.0-canary-6c7b41da3-20231123";
2828

2929
// ATTENTION
3030
// When adding new symbols to this file,

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

+1-1
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-fbc9b68d6-20231123";
583+
exports.version = "18.3.0-canary-6c7b41da3-20231123";

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ exports.useSyncExternalStore = function (
576576
exports.useTransition = function () {
577577
return ReactCurrentDispatcher.current.useTransition();
578578
};
579-
exports.version = "18.3.0-canary-fbc9b68d6-20231123";
579+
exports.version = "18.3.0-canary-6c7b41da3-20231123";
580580
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
581581
"function" ===
582582
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fbc9b68d61aba17a5a1119caac22647d0897486a
1+
6c7b41da3de12be2d95c60181b3fe896f824f13a

0 commit comments

Comments
 (0)