[compiler] treat ref-like identifiers as refs by default (#34005)

`@enableTreatRefLikeIdentifiersAsRefs` is now on by default. I made one
small fix to the render helper logic as part of this, uncovered by
including more tests.

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

DiffTrain build for [6891dcb87d](https://github.com/facebook/react/commit/6891dcb87db831db17ab109730dea63706875dd7)
This commit is contained in:
josephsavona
2025-07-29 10:59:10 -07:00
parent 0d2d171574
commit daaa3f089b
26 changed files with 127 additions and 95 deletions
+1 -1
View File
@@ -1 +1 @@
19.2.0-native-fb-1d7e942d-20250729
19.2.0-native-fb-6891dcb8-20250729
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<90f4613f3a107f64f97c5923b33fe914>>
* @generated SignedSource<<5bf13ff5aadfd9275a86ac3e2b1f36c8>>
*/
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<54f704a8d3cd499bbdfb9954ec4f3831>>
* @generated SignedSource<<9471eb83a3eca378bc8eb35da87dd737>>
*/
"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-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<54f704a8d3cd499bbdfb9954ec4f3831>>
* @generated SignedSource<<9471eb83a3eca378bc8eb35da87dd737>>
*/
"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-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<416d9592e499184397c64a33ff02a343>>
* @generated SignedSource<<a41bf72f6ffccdad21abab4174d539b1>>
*/
/*
@@ -29025,11 +29025,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-1d7e942d-20250729" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-6891dcb8-20250729" !== 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-1d7e942d-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-6891dcb8-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -29066,10 +29066,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -29207,5 +29207,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7a821c12be5d085a813416d55469c340>>
* @generated SignedSource<<6b85b7ebf8c0c5d48f546ec7f79b253b>>
*/
/*
@@ -17128,14 +17128,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2002 = React.version;
if (
"19.2.0-native-fb-1d7e942d-20250729" !==
"19.2.0-native-fb-6891dcb8-20250729" !==
isomorphicReactPackageVersion$jscomp$inline_2002
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2002,
"19.2.0-native-fb-1d7e942d-20250729"
"19.2.0-native-fb-6891dcb8-20250729"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17157,10 +17157,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2521 = {
bundleType: 0,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2522 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17258,4 +17258,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<bc8156f4464a6dc88a6e6d7a23608544>>
* @generated SignedSource<<ae532cba42e353e39472081e9846261f>>
*/
/*
@@ -19086,14 +19086,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2242 = React.version;
if (
"19.2.0-native-fb-1d7e942d-20250729" !==
"19.2.0-native-fb-6891dcb8-20250729" !==
isomorphicReactPackageVersion$jscomp$inline_2242
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2242,
"19.2.0-native-fb-1d7e942d-20250729"
"19.2.0-native-fb-6891dcb8-20250729"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19115,10 +19115,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2249 = {
bundleType: 0,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729",
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$319 = 0;
@@ -19231,4 +19231,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<fa8d1d3ff0b3a49a90fdd04f55013d0a>>
* @generated SignedSource<<3d1bc10d79b95ae53639ad90ed5c0460>>
*/
/*
@@ -29081,11 +29081,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-1d7e942d-20250729" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-6891dcb8-20250729" !== 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-1d7e942d-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.2.0-native-fb-6891dcb8-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
@@ -29122,10 +29122,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -29579,7 +29579,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<94179b79f0fd99bfb94d4163efd161c5>>
* @generated SignedSource<<40b11cc9212efd2af92ba8789b9ea6fe>>
*/
/*
@@ -17139,14 +17139,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2003 = React.version;
if (
"19.2.0-native-fb-1d7e942d-20250729" !==
"19.2.0-native-fb-6891dcb8-20250729" !==
isomorphicReactPackageVersion$jscomp$inline_2003
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2003,
"19.2.0-native-fb-1d7e942d-20250729"
"19.2.0-native-fb-6891dcb8-20250729"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17168,10 +17168,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2524 = {
bundleType: 0,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2525 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17422,4 +17422,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<5583867f9610c30684efd9cb3eba903e>>
* @generated SignedSource<<849c2b85781fb61e71fa7851681fcf4a>>
*/
/*
@@ -19101,14 +19101,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_2243 = React.version;
if (
"19.2.0-native-fb-1d7e942d-20250729" !==
"19.2.0-native-fb-6891dcb8-20250729" !==
isomorphicReactPackageVersion$jscomp$inline_2243
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_2243,
"19.2.0-native-fb-1d7e942d-20250729"
"19.2.0-native-fb-6891dcb8-20250729"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19130,10 +19130,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2250 = {
bundleType: 0,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729",
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$319 = 0;
@@ -19399,7 +19399,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<941863f2012088df4a2d53abe5789fe3>>
* @generated SignedSource<<61069dd595597f7d6089f110c1fd3292>>
*/
"use strict";
@@ -15739,10 +15739,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15887,5 +15887,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8b8b1e4756cdc864273aad519dfe2c4b>>
* @generated SignedSource<<d90375805bacd79404e9c0b5e980300f>>
*/
"use strict";
@@ -9912,10 +9912,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1432 = {
bundleType: 0,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1433 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -10051,4 +10051,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<9346064f525c6e5fbeb213ac18385ae6>>
* @generated SignedSource<<f73f52d6679d8a9c02461499f16c763d>>
*/
"use strict";
@@ -10532,10 +10532,10 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1239 = {
bundleType: 0,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729",
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$143 = 0;
@@ -10686,4 +10686,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<bd1ba01b00d748537f944b895d84bc46>>
* @generated SignedSource<<15d5dc28192ec7ee8eb0762481d41bb0>>
*/
"use strict";
@@ -1413,7 +1413,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<35965ee80f8925ec716ca0108e695787>>
* @generated SignedSource<<0ee3d38b5f715f08be7caa38803363db>>
*/
"use strict";
@@ -589,4 +589,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<132218f2ba6acaeaf826f7559c5ff0b2>>
* @generated SignedSource<<3553c1c03fb73576777d9f879de43328>>
*/
"use strict";
@@ -593,7 +593,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
exports.version = "19.2.0-native-fb-6891dcb8-20250729";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
1d7e942da76c794c3cbf52a8c214d90a69814a8f
6891dcb87db831db17ab109730dea63706875dd7
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7fbec193dfc3212d6d764c0a888de389>>
* @generated SignedSource<<f64533863b698ca863b05e119bfaeb09>>
*/
"use strict";
@@ -19244,10 +19244,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<400281c8be6307d1602b4d7c0f7f3531>>
* @generated SignedSource<<5c15cc626eac4036390d7fe3bd005d03>>
*/
"use strict";
@@ -11016,10 +11016,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1235 = {
bundleType: 0,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1235.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b74f7d66cccc71de255dd4edb73c90b9>>
* @generated SignedSource<<010127ff0eabed359c758945eab49f32>>
*/
"use strict";
@@ -12945,10 +12945,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1470 = {
bundleType: 0,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1470.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1cbb230e2ddbd5ce4caa2c95b8bb1a4a>>
* @generated SignedSource<<80e4f652765146c6546ef2af970fe26a>>
*/
"use strict";
@@ -19602,11 +19602,11 @@ __DEV__ &&
shouldSuspendImpl = newShouldSuspendImpl;
};
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-1d7e942d-20250729" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-6891dcb8-20250729" !== 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-1d7e942d-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-6891dcb8-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -19632,10 +19632,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<5e053bd89d244985b1f5749f62577a3b>>
* @generated SignedSource<<47e821c72f01a1e4b2c063384a092441>>
*/
"use strict";
@@ -11242,11 +11242,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-1d7e942d-20250729" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-6891dcb8-20250729" !== 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-1d7e942d-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-6891dcb8-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11296,10 +11296,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1293 = {
bundleType: 0,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1293.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<91192919b72eba9695edd3af4fd6f21d>>
* @generated SignedSource<<0e6fabe9097d68194a9669eb94ee7ccb>>
*/
"use strict";
@@ -13160,11 +13160,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.2.0-native-fb-1d7e942d-20250729" !== isomorphicReactPackageVersion)
if ("19.2.0-native-fb-6891dcb8-20250729" !== 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-1d7e942d-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.2.0-native-fb-6891dcb8-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -13214,10 +13214,10 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1528 = {
bundleType: 0,
version: "19.2.0-native-fb-1d7e942d-20250729",
version: "19.2.0-native-fb-6891dcb8-20250729",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
reconcilerVersion: "19.2.0-native-fb-6891dcb8-20250729"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1528.rendererConfig = extraDevToolsConfig);
@@ -12,7 +12,7 @@
* @lightSyntaxTransform
* @preventMunge
* @oncall react_core
* @generated SignedSource<<2330f949c229f6527117f953261139b0>>
* @generated SignedSource<<1532ca94b5cd60e695ea4e8f6e4dc5ba>>
*/
'use strict';
@@ -30734,7 +30734,7 @@ const EnvironmentConfigSchema = zod.z.object({
enableChangeDetectionForDebugging: ExternalFunctionSchema.nullable().default(null),
enableCustomTypeDefinitionForReanimated: zod.z.boolean().default(false),
hookPattern: zod.z.string().nullable().default(null),
enableTreatRefLikeIdentifiersAsRefs: zod.z.boolean().default(false),
enableTreatRefLikeIdentifiersAsRefs: zod.z.boolean().default(true),
lowerContextAccess: ExternalFunctionSchema.nullable().default(null),
validateNoVoidUseMemo: zod.z.boolean().default(false),
});
@@ -48335,6 +48335,19 @@ function validateNoRefAccessInRenderImpl(fn, env) {
const type = refTypeOfType(place);
env.set(place.identifier.id, type);
}
const interpolatedAsJsx = new Set();
for (const block of fn.body.blocks.values()) {
for (const instr of block.instructions) {
const { value } = instr;
if (value.kind === 'JsxExpression' || value.kind === 'JsxFragment') {
if (value.children != null) {
for (const child of value.children) {
interpolatedAsJsx.add(child.identifier.id);
}
}
}
}
}
for (let i = 0; (i == 0 || env.hasChanged()) && i < 10; i++) {
env.resetChanged();
returnValues = [];
@@ -48448,10 +48461,13 @@ function validateNoRefAccessInRenderImpl(fn, env) {
if (!didError) {
const isRefLValue = isUseRefType(instr.lvalue.identifier);
for (const operand of eachInstructionValueOperand(instr.value)) {
if (hookKind != null) {
if (isRefLValue || hookKind != null) {
validateNoDirectRefValueAccess(errors, operand, env);
}
else if (!isRefLValue) {
else if (interpolatedAsJsx.has(instr.lvalue.identifier.id)) {
validateNoRefValueAccess(errors, env, operand);
}
else {
validateNoRefPassedToFunction(errors, env, operand, operand.loc);
}
}
@@ -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<<77f496fc546154c35cf03cd9bc0fa6d9>>
* @generated SignedSource<<07edbd26c3be59b753b59bb18e9b0708>>
*/
'use strict';
@@ -30513,7 +30513,7 @@ const EnvironmentConfigSchema = zod.z.object({
enableChangeDetectionForDebugging: ExternalFunctionSchema.nullable().default(null),
enableCustomTypeDefinitionForReanimated: zod.z.boolean().default(false),
hookPattern: zod.z.string().nullable().default(null),
enableTreatRefLikeIdentifiersAsRefs: zod.z.boolean().default(false),
enableTreatRefLikeIdentifiersAsRefs: zod.z.boolean().default(true),
lowerContextAccess: ExternalFunctionSchema.nullable().default(null),
validateNoVoidUseMemo: zod.z.boolean().default(false),
});
@@ -48114,6 +48114,19 @@ function validateNoRefAccessInRenderImpl(fn, env) {
const type = refTypeOfType(place);
env.set(place.identifier.id, type);
}
const interpolatedAsJsx = new Set();
for (const block of fn.body.blocks.values()) {
for (const instr of block.instructions) {
const { value } = instr;
if (value.kind === 'JsxExpression' || value.kind === 'JsxFragment') {
if (value.children != null) {
for (const child of value.children) {
interpolatedAsJsx.add(child.identifier.id);
}
}
}
}
}
for (let i = 0; (i == 0 || env.hasChanged()) && i < 10; i++) {
env.resetChanged();
returnValues = [];
@@ -48227,10 +48240,13 @@ function validateNoRefAccessInRenderImpl(fn, env) {
if (!didError) {
const isRefLValue = isUseRefType(instr.lvalue.identifier);
for (const operand of eachInstructionValueOperand(instr.value)) {
if (hookKind != null) {
if (isRefLValue || hookKind != null) {
validateNoDirectRefValueAccess(errors, operand, env);
}
else if (!isRefLValue) {
else if (interpolatedAsJsx.has(instr.lvalue.identifier.id)) {
validateNoRefValueAccess(errors, env, operand);
}
else {
validateNoRefPassedToFunction(errors, env, operand, operand.loc);
}
}
@@ -1,7 +1,7 @@
{
"name": "eslint-plugin-react-hooks",
"description": "ESLint rules for React Hooks",
"version": "0.0.0-experimental-1d7e942d-20250729",
"version": "0.0.0-experimental-6891dcb8-20250729",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",