[compiler] Cleanup for @enablePreserveExistingMemoizationGuarantees (#34346)

I tried turning on `@enablePreserveExistingMemoizationGuarantees` by
default and cleaned up a couple small things:

* We emit freeze calls for StartMemoize deps but these had
ValueReason.Other so the message wasn't great. We now treat these like
other hook arguments.
* PruneNonEscapingScopes was being too aggressive in this mode and
memoizing even loads of globals. Switching to
MemoizationLevel.Conditional ensures we build a graph that connects
through to primitive-returning function calls, but doesn't unnecessarily
force memoization otherwise.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34346).
* #34347
* __->__ #34346

DiffTrain build for [2710795a1e](https://github.com/facebook/react/commit/2710795a1ed339764d2fa76b6d7bc94dded6ee60)
This commit is contained in:
josephsavona
2025-09-03 21:37:11 -07:00
parent 4a2aee93b0
commit 7ac0c331c2
26 changed files with 113 additions and 105 deletions
+1 -1
View File
@@ -1 +1 @@
19.2.0-native-fb-5d64f742-20250903
19.2.0-native-fb-2710795a-20250903
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<284b800cfd709e3980dc13f48703e487>>
* @generated SignedSource<<8fdee79b2be80e1c879fcee43caf1bdb>>
*/
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a38ddfea77db84745032f66564839caf>>
* @generated SignedSource<<7b5fc51fe77480f2cb10a2b5a88d9717>>
*/
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a38ddfea77db84745032f66564839caf>>
* @generated SignedSource<<7b5fc51fe77480f2cb10a2b5a88d9717>>
*/
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<446d46f3693ceab0a9e8880c897584ae>>
* @generated SignedSource<<564b1134cc3c7eb4f6c9bcf1dd7f1abb>>
*/
/*
@@ -29580,11 +29580,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-5d64f742-20250903" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-2710795a-20250903" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.2.0-native-fb-5d64f742-20250903\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-2710795a-20250903\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -29621,10 +29621,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -29773,5 +29773,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d948d548beb25a8668350e189f3f9b70>>
* @generated SignedSource<<0576f395479aa6c5d59dc6dae5e74e53>>
*/
/*
@@ -17388,14 +17388,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2057 = React.version;
if (
"19.2.0-native-fb-5d64f742-20250903" !==
"19.2.0-native-fb-2710795a-20250903" !==
isomorphicReactPackageVersion$jscomp$inline_2057
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2057,
"19.2.0-native-fb-5d64f742-20250903"
"19.2.0-native-fb-2710795a-20250903"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17417,10 +17417,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2630 = {
bundleType: 0,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2631 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17527,4 +17527,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0609c334d320a63e957a47f290999130>>
* @generated SignedSource<<69e08d3f9dd3b77f978767542f787982>>
*/
/*
@@ -19398,14 +19398,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2308 = React.version;
if (
"19.2.0-native-fb-5d64f742-20250903" !==
"19.2.0-native-fb-2710795a-20250903" !==
isomorphicReactPackageVersion$jscomp$inline_2308
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2308,
"19.2.0-native-fb-5d64f742-20250903"
"19.2.0-native-fb-2710795a-20250903"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19427,10 +19427,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2315 = {
bundleType: 0,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903",
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$324 = 0;
@@ -19553,4 +19553,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<e7d32ab082fd2b006b748e04d928c908>>
* @generated SignedSource<<6d95dacf4ffc31f44961003b49649bfc>>
*/
/*
@@ -29636,11 +29636,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-5d64f742-20250903" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-2710795a-20250903" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.2.0-native-fb-5d64f742-20250903\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-2710795a-20250903\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -29677,10 +29677,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30145,7 +30145,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8ff888c7d59f199a09717bd524ffd012>>
* @generated SignedSource<<5efdcaecd4e7c67c2d5759368eef4519>>
*/
/*
@@ -17399,14 +17399,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2058 = React.version;
if (
"19.2.0-native-fb-5d64f742-20250903" !==
"19.2.0-native-fb-2710795a-20250903" !==
isomorphicReactPackageVersion$jscomp$inline_2058
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2058,
"19.2.0-native-fb-5d64f742-20250903"
"19.2.0-native-fb-2710795a-20250903"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17428,10 +17428,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2633 = {
bundleType: 0,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2634 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17691,4 +17691,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6d1419371baad9f661e9eebd4c1ecfa8>>
* @generated SignedSource<<0b6a00d001d041b6d412f4069d96ea63>>
*/
/*
@@ -19413,14 +19413,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2309 = React.version;
if (
"19.2.0-native-fb-5d64f742-20250903" !==
"19.2.0-native-fb-2710795a-20250903" !==
isomorphicReactPackageVersion$jscomp$inline_2309
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2309,
"19.2.0-native-fb-5d64f742-20250903"
"19.2.0-native-fb-2710795a-20250903"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19442,10 +19442,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2316 = {
bundleType: 0,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903",
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$324 = 0;
@@ -19721,7 +19721,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ec4fd3e1905c551c9a7f0dc8944007c0>>
* @generated SignedSource<<dd869563f90b01f98562d472dddf3b26>>
*/
"use strict";
@@ -15881,10 +15881,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16029,5 +16029,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<067bdd0424fb2389e6b6565c019f3d68>>
* @generated SignedSource<<9c239076c4f35995a6c3dbbe41f91e14>>
*/
"use strict";
@@ -10045,10 +10045,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1469 = {
bundleType: 0,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1470 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10184,4 +10184,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<96b875d2f0715e8b70f8c7aadcbdd0a3>>
* @generated SignedSource<<66d0a99e910e731dafa4e6d5149d866a>>
*/
"use strict";
@@ -10666,10 +10666,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1260 = {
bundleType: 0,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903",
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$145 = 0;
@@ -10820,4 +10820,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<74211edef9d4a787984e705b512f0084>>
* @generated SignedSource<<6f118ed5d6a3a4129a0eaa8e5f1fb27f>>
*/
"use strict";
@@ -1397,7 +1397,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<227582aea73687da1d2fadce1db32445>>
* @generated SignedSource<<f4c22e38a3043094f40c43873c8f6586>>
*/
"use strict";
@@ -579,4 +579,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<be21efe133512f36d214229550af8887>>
* @generated SignedSource<<7afc0d07fc24ad69895fc3e8ee4a30ff>>
*/
"use strict";
@@ -583,7 +583,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-5d64f742-20250903";
exports.version = "19.2.0-native-fb-2710795a-20250903";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
5d64f742114203e4fbdd605ce398696d18901f35
2710795a1ed339764d2fa76b6d7bc94dded6ee60
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<41c4179e4e7894e4d873807e1f16f42b>>
* @generated SignedSource<<f5e62862888d50311760b229aaf13d30>>
*/
"use strict";
@@ -19705,10 +19705,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ad670b0d8193527757290355416b501d>>
* @generated SignedSource<<29b49033668652898adc034c02d6aa9f>>
*/
"use strict";
@@ -11211,10 +11211,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1281 = {
bundleType: 0,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1281.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7b73add46f162166302881a22ee414ea>>
* @generated SignedSource<<006fb3fc38edcdd59fe1a08283f06ae2>>
*/
"use strict";
@@ -13162,10 +13162,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1525 = {
bundleType: 0,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1525.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<98f8bfab01fbf2a50e530d2edc7823c0>>
* @generated SignedSource<<3e1329186e1136c9806d614e17c23925>>
*/
"use strict";
@@ -19985,11 +19985,11 @@ __DEV__ &&
shouldSuspendImpl = newShouldSuspendImpl;
};
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-5d64f742-20250903" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-2710795a-20250903" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.2.0-native-fb-5d64f742-20250903\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-2710795a-20250903\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -20015,10 +20015,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b1daf8b878b160530c53d66d15b1536e>>
* @generated SignedSource<<a75c74cf7b7e533623826e9921c253f5>>
*/
"use strict";
@@ -11370,11 +11370,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-5d64f742-20250903" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-2710795a-20250903" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.2.0-native-fb-5d64f742-20250903\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-2710795a-20250903\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11424,10 +11424,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1312 = {
bundleType: 0,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1312.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<6fd187499582bbb7d1ac351316167a23>>
* @generated SignedSource<<7f5acac65f10c299a5ca4acdd996927a>>
*/
"use strict";
@@ -13311,11 +13311,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-5d64f742-20250903" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-2710795a-20250903" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.2.0-native-fb-5d64f742-20250903\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-2710795a-20250903\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -13365,10 +13365,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1556 = {
bundleType: 0,
version: "19.2.0-native-fb-5d64f742-20250903",
version: "19.2.0-native-fb-2710795a-20250903",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-5d64f742-20250903"
reconcilerVersion: "19.2.0-native-fb-2710795a-20250903"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1556.rendererConfig = extraDevToolsConfig);
@@ -12,7 +12,7 @@
* @lightSyntaxTransform
* @preventMunge
* @oncall react_core
* @generated SignedSource<<f60050ed6936d3ae8462c48b060132fd>>
* @generated SignedSource<<b6aab3157a965bb10b8d116c436fd916>>
*/
'use strict';
@@ -40775,7 +40775,7 @@ function computeSignatureForInstruction(context, env, instr) {
effects.push({
kind: 'Freeze',
value: operand,
reason: ValueReason.Other,
reason: ValueReason.HookCaptured,
});
}
}
@@ -41509,7 +41509,8 @@ class CollectDependenciesVisitor extends ReactiveFunctionVisitor {
this.state = state;
this.options = {
memoizeJsxElements: !this.env.config.enableForest,
forceMemoizePrimitives: this.env.config.enableForest,
forceMemoizePrimitives: this.env.config.enableForest ||
this.env.config.enablePreserveExistingMemoizationGuarantees,
};
}
computeMemoizationInputs(value, lvalue) {
@@ -41597,9 +41598,14 @@ class CollectDependenciesVisitor extends ReactiveFunctionVisitor {
case 'JSXText':
case 'BinaryExpression':
case 'UnaryExpression': {
const level = options.forceMemoizePrimitives
? MemoizationLevel.Memoized
: MemoizationLevel.Never;
if (options.forceMemoizePrimitives) {
const level = MemoizationLevel.Conditional;
return {
lvalues: lvalue !== null ? [{ place: lvalue, level }] : [],
rvalues: [...eachReactiveValueOperand(value)],
};
}
const level = MemoizationLevel.Never;
return {
lvalues: lvalue !== null ? [{ place: lvalue, level }] : [],
rvalues: [],
@@ -41730,9 +41736,7 @@ class CollectDependenciesVisitor extends ReactiveFunctionVisitor {
}
case 'ComputedLoad':
case 'PropertyLoad': {
const level = options.forceMemoizePrimitives
? MemoizationLevel.Memoized
: MemoizationLevel.Conditional;
const level = MemoizationLevel.Conditional;
return {
lvalues: lvalue !== null ? [{ place: lvalue, level }] : [],
rvalues: [value.object],
@@ -6,7 +6,7 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @generated SignedSource<<35e4d9cfd8648bf600caf5bafab7d488>>
* @generated SignedSource<<cb3b475a5862ccaa8a70298ee66271df>>
*/
'use strict';
@@ -40554,7 +40554,7 @@ function computeSignatureForInstruction(context, env, instr) {
effects.push({
kind: 'Freeze',
value: operand,
reason: ValueReason.Other,
reason: ValueReason.HookCaptured,
});
}
}
@@ -41288,7 +41288,8 @@ class CollectDependenciesVisitor extends ReactiveFunctionVisitor {
this.state = state;
this.options = {
memoizeJsxElements: !this.env.config.enableForest,
forceMemoizePrimitives: this.env.config.enableForest,
forceMemoizePrimitives: this.env.config.enableForest ||
this.env.config.enablePreserveExistingMemoizationGuarantees,
};
}
computeMemoizationInputs(value, lvalue) {
@@ -41376,9 +41377,14 @@ class CollectDependenciesVisitor extends ReactiveFunctionVisitor {
case 'JSXText':
case 'BinaryExpression':
case 'UnaryExpression': {
const level = options.forceMemoizePrimitives
? MemoizationLevel.Memoized
: MemoizationLevel.Never;
if (options.forceMemoizePrimitives) {
const level = MemoizationLevel.Conditional;
return {
lvalues: lvalue !== null ? [{ place: lvalue, level }] : [],
rvalues: [...eachReactiveValueOperand(value)],
};
}
const level = MemoizationLevel.Never;
return {
lvalues: lvalue !== null ? [{ place: lvalue, level }] : [],
rvalues: [],
@@ -41509,9 +41515,7 @@ class CollectDependenciesVisitor extends ReactiveFunctionVisitor {
}
case 'ComputedLoad':
case 'PropertyLoad': {
const level = options.forceMemoizePrimitives
? MemoizationLevel.Memoized
: MemoizationLevel.Conditional;
const level = MemoizationLevel.Conditional;
return {
lvalues: lvalue !== null ? [{ place: lvalue, level }] : [],
rvalues: [value.object],
@@ -1,7 +1,7 @@
{
"name": "eslint-plugin-react-hooks",
"description": "ESLint rules for React Hooks",
"version": "0.0.0-experimental-5d64f742-20250903",
"version": "0.0.0-experimental-2710795a-20250903",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",