You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardexpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js
+1-1
Original file line number
Diff line number
Diff line change
@@ -25474,7 +25474,7 @@ if (__DEV__) {
25474
25474
return root;
25475
25475
}
25476
25476
25477
-
var ReactVersion = "18.3.0-canary-fbc9b68d6-20231123";
25477
+
var ReactVersion = "18.3.0-canary-6c7b41da3-20231123";
Copy file name to clipboardexpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js
+2-2
Original file line number
Diff line number
Diff line change
@@ -9083,7 +9083,7 @@ var devToolsConfig$jscomp$inline_1033 = {
9083
9083
throwError("TestRenderer does not support findFiberByHostInstance()");
9084
9084
},
9085
9085
bundleType: 0,
9086
-
version: "18.3.0-canary-fbc9b68d6-20231123",
9086
+
version: "18.3.0-canary-6c7b41da3-20231123",
9087
9087
rendererPackageName: "react-test-renderer"
9088
9088
};
9089
9089
varinternals$jscomp$inline_1226={
@@ -9114,7 +9114,7 @@ var internals$jscomp$inline_1226 = {
Copy file name to clipboardexpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+2-2
Original file line number
Diff line number
Diff line change
@@ -9509,7 +9509,7 @@ var devToolsConfig$jscomp$inline_1075 = {
9509
9509
throwError("TestRenderer does not support findFiberByHostInstance()");
9510
9510
},
9511
9511
bundleType: 0,
9512
-
version: "18.3.0-canary-fbc9b68d6-20231123",
9512
+
version: "18.3.0-canary-6c7b41da3-20231123",
9513
9513
rendererPackageName: "react-test-renderer"
9514
9514
};
9515
9515
varinternals$jscomp$inline_1267={
@@ -9540,7 +9540,7 @@ var internals$jscomp$inline_1267 = {
0 commit comments