mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[compiler] Allow mergeRefs pattern (and detect refs passed as ref prop) (#34004)
Two related changes:
* ValidateNoRefAccessInRender now allows the mergeRefs pattern, ie a
function that aggregates multiple refs into a new ref. This is the main
case where we have seen false positive no-ref-in-render errors.
* Behind `@enableTreatRefLikeIdentifiersAsRefs`, we infer values passed
as the `ref` prop to some JSX as refs.
The second change is potentially helpful for situations such as
```js
function Component({ref: parentRef}) {
const childRef = useRef(null);
const mergedRef = mergeRefs(parentRef, childRef);
useEffect(() => {
// generally accesses childRef, not mergedRef
}, []);
return <Foo ref={mergedRef} />;
}
```
Ie where you create a merged ref but don't access its `.current`
property. Without inferring `ref` props as refs, we'd fail to allow this
merge refs case.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34004).
* #34027
* #34026
* #34025
* #34024
* #34005
* #34006
* __->__ #34004
DiffTrain build for [1d7e942da7](https://github.com/facebook/react/commit/1d7e942da76c794c3cbf52a8c214d90a69814a8f)
This commit is contained in:
@@ -1 +1 @@
|
||||
19.2.0-native-fb-79dc7064-20250729
|
||||
19.2.0-native-fb-1d7e942d-20250729
|
||||
Vendored
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<5100227c38f1767bcc610300d94bb495>>
|
||||
* @generated SignedSource<<90f4613f3a107f64f97c5923b33fe914>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -404,5 +404,5 @@ __DEV__ &&
|
||||
exports.useFormStatus = function () {
|
||||
return resolveDispatcher().useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.2.0-native-fb-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
})();
|
||||
|
||||
Vendored
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<8ff975b58bd07faa2d9814bbab8ad686>>
|
||||
* @generated SignedSource<<54f704a8d3cd499bbdfb9954ec4f3831>>
|
||||
*/
|
||||
|
||||
"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-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
|
||||
Vendored
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<8ff975b58bd07faa2d9814bbab8ad686>>
|
||||
* @generated SignedSource<<54f704a8d3cd499bbdfb9954ec4f3831>>
|
||||
*/
|
||||
|
||||
"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-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
|
||||
Vendored
+6
-6
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<eca41d1a13a320259be685c4e443478d>>
|
||||
* @generated SignedSource<<416d9592e499184397c64a33ff02a343>>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -29025,11 +29025,11 @@ __DEV__ &&
|
||||
};
|
||||
(function () {
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.2.0-native-fb-79dc7064-20250729" !== isomorphicReactPackageVersion)
|
||||
if ("19.2.0-native-fb-1d7e942d-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-79dc7064-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-dom: 19.2.0-native-fb-1d7e942d-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-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-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-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
})();
|
||||
|
||||
compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js
Vendored
+6
-6
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<16ecd92c96e0780450a26f2313941ec9>>
|
||||
* @generated SignedSource<<7a821c12be5d085a813416d55469c340>>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -17128,14 +17128,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
|
||||
};
|
||||
var isomorphicReactPackageVersion$jscomp$inline_2002 = React.version;
|
||||
if (
|
||||
"19.2.0-native-fb-79dc7064-20250729" !==
|
||||
"19.2.0-native-fb-1d7e942d-20250729" !==
|
||||
isomorphicReactPackageVersion$jscomp$inline_2002
|
||||
)
|
||||
throw Error(
|
||||
formatProdErrorMessage(
|
||||
527,
|
||||
isomorphicReactPackageVersion$jscomp$inline_2002,
|
||||
"19.2.0-native-fb-79dc7064-20250729"
|
||||
"19.2.0-native-fb-1d7e942d-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-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-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-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
|
||||
+6
-6
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<a5e571ee1773f491354da47334b3fa9f>>
|
||||
* @generated SignedSource<<bc8156f4464a6dc88a6e6d7a23608544>>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -19086,14 +19086,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
|
||||
};
|
||||
var isomorphicReactPackageVersion$jscomp$inline_2242 = React.version;
|
||||
if (
|
||||
"19.2.0-native-fb-79dc7064-20250729" !==
|
||||
"19.2.0-native-fb-1d7e942d-20250729" !==
|
||||
isomorphicReactPackageVersion$jscomp$inline_2242
|
||||
)
|
||||
throw Error(
|
||||
formatProdErrorMessage(
|
||||
527,
|
||||
isomorphicReactPackageVersion$jscomp$inline_2242,
|
||||
"19.2.0-native-fb-79dc7064-20250729"
|
||||
"19.2.0-native-fb-1d7e942d-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-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729",
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-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-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
|
||||
+6
-6
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<d40c8016cde465d3fac17e4bd12beb0b>>
|
||||
* @generated SignedSource<<fa8d1d3ff0b3a49a90fdd04f55013d0a>>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -29081,11 +29081,11 @@ __DEV__ &&
|
||||
};
|
||||
(function () {
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.2.0-native-fb-79dc7064-20250729" !== isomorphicReactPackageVersion)
|
||||
if ("19.2.0-native-fb-1d7e942d-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-79dc7064-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-dom: 19.2.0-native-fb-1d7e942d-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-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-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-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
+6
-6
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<5b055dc755c28ae3a86d828a42c00abf>>
|
||||
* @generated SignedSource<<94179b79f0fd99bfb94d4163efd161c5>>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -17139,14 +17139,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
|
||||
};
|
||||
var isomorphicReactPackageVersion$jscomp$inline_2003 = React.version;
|
||||
if (
|
||||
"19.2.0-native-fb-79dc7064-20250729" !==
|
||||
"19.2.0-native-fb-1d7e942d-20250729" !==
|
||||
isomorphicReactPackageVersion$jscomp$inline_2003
|
||||
)
|
||||
throw Error(
|
||||
formatProdErrorMessage(
|
||||
527,
|
||||
isomorphicReactPackageVersion$jscomp$inline_2003,
|
||||
"19.2.0-native-fb-79dc7064-20250729"
|
||||
"19.2.0-native-fb-1d7e942d-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-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-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-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
|
||||
+6
-6
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<1d89a3052bd4a9de985b789602a88419>>
|
||||
* @generated SignedSource<<5583867f9610c30684efd9cb3eba903e>>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -19101,14 +19101,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
|
||||
};
|
||||
var isomorphicReactPackageVersion$jscomp$inline_2243 = React.version;
|
||||
if (
|
||||
"19.2.0-native-fb-79dc7064-20250729" !==
|
||||
"19.2.0-native-fb-1d7e942d-20250729" !==
|
||||
isomorphicReactPackageVersion$jscomp$inline_2243
|
||||
)
|
||||
throw Error(
|
||||
formatProdErrorMessage(
|
||||
527,
|
||||
isomorphicReactPackageVersion$jscomp$inline_2243,
|
||||
"19.2.0-native-fb-79dc7064-20250729"
|
||||
"19.2.0-native-fb-1d7e942d-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-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-dom",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729",
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-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-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<720fd1945dbb0a473801fb17f4a12e84>>
|
||||
* @generated SignedSource<<941863f2012088df4a2d53abe5789fe3>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -15739,10 +15739,10 @@ __DEV__ &&
|
||||
(function () {
|
||||
var internals = {
|
||||
bundleType: 1,
|
||||
version: "19.2.0-native-fb-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-test-renderer",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
|
||||
};
|
||||
internals.overrideHookState = overrideHookState;
|
||||
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
|
||||
@@ -15887,5 +15887,5 @@ __DEV__ &&
|
||||
flushSyncWorkAcrossRoots_impl(0, !0));
|
||||
}
|
||||
};
|
||||
exports.version = "19.2.0-native-fb-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
})();
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<6642abeb557c0c634cf2ce7a4ebc34d0>>
|
||||
* @generated SignedSource<<8b8b1e4756cdc864273aad519dfe2c4b>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -9912,10 +9912,10 @@ function wrapFiber(fiber) {
|
||||
}
|
||||
var internals$jscomp$inline_1432 = {
|
||||
bundleType: 0,
|
||||
version: "19.2.0-native-fb-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-test-renderer",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-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-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<6033c674f5f1ce75bdd8fac2ea383a60>>
|
||||
* @generated SignedSource<<9346064f525c6e5fbeb213ac18385ae6>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -10532,10 +10532,10 @@ function wrapFiber(fiber) {
|
||||
}
|
||||
var internals$jscomp$inline_1239 = {
|
||||
bundleType: 0,
|
||||
version: "19.2.0-native-fb-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-test-renderer",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729",
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-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-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<e76439481f12fcd45fc1c74db7bdcb2d>>
|
||||
* @generated SignedSource<<bd1ba01b00d748537f944b895d84bc46>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -1413,7 +1413,7 @@ __DEV__ &&
|
||||
exports.useTransition = function () {
|
||||
return resolveDispatcher().useTransition();
|
||||
};
|
||||
exports.version = "19.2.0-native-fb-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<3b4ccea00b3bcdaddc4d9345bca8debb>>
|
||||
* @generated SignedSource<<35965ee80f8925ec716ca0108e695787>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -589,4 +589,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactSharedInternals.H.useTransition();
|
||||
};
|
||||
exports.version = "19.2.0-native-fb-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
|
||||
Vendored
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<cfa14048f5909ffed2d4a1b15e4ddb77>>
|
||||
* @generated SignedSource<<132218f2ba6acaeaf826f7559c5ff0b2>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -593,7 +593,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactSharedInternals.H.useTransition();
|
||||
};
|
||||
exports.version = "19.2.0-native-fb-79dc7064-20250729";
|
||||
exports.version = "19.2.0-native-fb-1d7e942d-20250729";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
79dc706498c4f8ef077167898492693197e1b975
|
||||
1d7e942da76c794c3cbf52a8c214d90a69814a8f
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<738e785daf5d7f764e2ebc2cb1bb185c>>
|
||||
* @generated SignedSource<<7fbec193dfc3212d6d764c0a888de389>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -19244,10 +19244,10 @@ __DEV__ &&
|
||||
(function () {
|
||||
var internals = {
|
||||
bundleType: 1,
|
||||
version: "19.2.0-native-fb-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
|
||||
};
|
||||
null !== extraDevToolsConfig &&
|
||||
(internals.rendererConfig = extraDevToolsConfig);
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<d65d865271440b469356e3f4e57c7dc7>>
|
||||
* @generated SignedSource<<400281c8be6307d1602b4d7c0f7f3531>>
|
||||
*/
|
||||
|
||||
"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-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
|
||||
};
|
||||
null !== extraDevToolsConfig &&
|
||||
(internals$jscomp$inline_1235.rendererConfig = extraDevToolsConfig);
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<bc067959c9587ee73d8f244ba6764ee2>>
|
||||
* @generated SignedSource<<b74f7d66cccc71de255dd4edb73c90b9>>
|
||||
*/
|
||||
|
||||
"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-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
|
||||
};
|
||||
null !== extraDevToolsConfig &&
|
||||
(internals$jscomp$inline_1470.rendererConfig = extraDevToolsConfig);
|
||||
|
||||
+5
-5
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<f40d8d1b86477cd8d6b9b1b36fc69922>>
|
||||
* @generated SignedSource<<1cbb230e2ddbd5ce4caa2c95b8bb1a4a>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -19602,11 +19602,11 @@ __DEV__ &&
|
||||
shouldSuspendImpl = newShouldSuspendImpl;
|
||||
};
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.2.0-native-fb-79dc7064-20250729" !== isomorphicReactPackageVersion)
|
||||
if ("19.2.0-native-fb-1d7e942d-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-79dc7064-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-native-renderer: 19.2.0-native-fb-1d7e942d-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-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
|
||||
};
|
||||
null !== extraDevToolsConfig &&
|
||||
(internals.rendererConfig = extraDevToolsConfig);
|
||||
|
||||
+5
-5
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<c8c710d94a061b74e2391219cd8d6854>>
|
||||
* @generated SignedSource<<5e053bd89d244985b1f5749f62577a3b>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -11242,11 +11242,11 @@ function updateContainer(element, container, parentComponent, callback) {
|
||||
return lane;
|
||||
}
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.2.0-native-fb-79dc7064-20250729" !== isomorphicReactPackageVersion)
|
||||
if ("19.2.0-native-fb-1d7e942d-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-79dc7064-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-native-renderer: 19.2.0-native-fb-1d7e942d-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-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
|
||||
};
|
||||
null !== extraDevToolsConfig &&
|
||||
(internals$jscomp$inline_1293.rendererConfig = extraDevToolsConfig);
|
||||
|
||||
+5
-5
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<be4b226e6adb168b1de833cee3f3f29c>>
|
||||
* @generated SignedSource<<91192919b72eba9695edd3af4fd6f21d>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -13160,11 +13160,11 @@ function updateContainer(element, container, parentComponent, callback) {
|
||||
return lane;
|
||||
}
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.2.0-native-fb-79dc7064-20250729" !== isomorphicReactPackageVersion)
|
||||
if ("19.2.0-native-fb-1d7e942d-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-79dc7064-20250729\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-native-renderer: 19.2.0-native-fb-1d7e942d-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-79dc7064-20250729",
|
||||
version: "19.2.0-native-fb-1d7e942d-20250729",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
currentDispatcherRef: ReactSharedInternals,
|
||||
reconcilerVersion: "19.2.0-native-fb-79dc7064-20250729"
|
||||
reconcilerVersion: "19.2.0-native-fb-1d7e942d-20250729"
|
||||
};
|
||||
null !== extraDevToolsConfig &&
|
||||
(internals$jscomp$inline_1528.rendererConfig = extraDevToolsConfig);
|
||||
|
||||
+15
-2
@@ -12,7 +12,7 @@
|
||||
* @lightSyntaxTransform
|
||||
* @preventMunge
|
||||
* @oncall react_core
|
||||
* @generated SignedSource<<7b5ad27d2ad9b3ff54e2ffc7a755e6a3>>
|
||||
* @generated SignedSource<<2330f949c229f6527117f953261139b0>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -47354,6 +47354,18 @@ function* generateInstructionTypes(env, names, instr) {
|
||||
}
|
||||
case 'JsxExpression':
|
||||
case 'JsxFragment': {
|
||||
if (env.config.enableTreatRefLikeIdentifiersAsRefs) {
|
||||
if (value.kind === 'JsxExpression') {
|
||||
for (const prop of value.props) {
|
||||
if (prop.kind === 'JsxAttribute' && prop.name === 'ref') {
|
||||
yield equation(prop.place.identifier.type, {
|
||||
kind: 'Object',
|
||||
shapeId: BuiltInUseRefId,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
yield equation(left, { kind: 'Object', shapeId: BuiltInJsxId });
|
||||
break;
|
||||
}
|
||||
@@ -48434,11 +48446,12 @@ function validateNoRefAccessInRenderImpl(fn, env) {
|
||||
}
|
||||
}
|
||||
if (!didError) {
|
||||
const isRefLValue = isUseRefType(instr.lvalue.identifier);
|
||||
for (const operand of eachInstructionValueOperand(instr.value)) {
|
||||
if (hookKind != null) {
|
||||
validateNoDirectRefValueAccess(errors, operand, env);
|
||||
}
|
||||
else {
|
||||
else if (!isRefLValue) {
|
||||
validateNoRefPassedToFunction(errors, env, operand, operand.loc);
|
||||
}
|
||||
}
|
||||
|
||||
+15
-2
@@ -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<<64572058ce96b666592e1c4520ef72ad>>
|
||||
* @generated SignedSource<<77f496fc546154c35cf03cd9bc0fa6d9>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -47133,6 +47133,18 @@ function* generateInstructionTypes(env, names, instr) {
|
||||
}
|
||||
case 'JsxExpression':
|
||||
case 'JsxFragment': {
|
||||
if (env.config.enableTreatRefLikeIdentifiersAsRefs) {
|
||||
if (value.kind === 'JsxExpression') {
|
||||
for (const prop of value.props) {
|
||||
if (prop.kind === 'JsxAttribute' && prop.name === 'ref') {
|
||||
yield equation(prop.place.identifier.type, {
|
||||
kind: 'Object',
|
||||
shapeId: BuiltInUseRefId,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
yield equation(left, { kind: 'Object', shapeId: BuiltInJsxId });
|
||||
break;
|
||||
}
|
||||
@@ -48213,11 +48225,12 @@ function validateNoRefAccessInRenderImpl(fn, env) {
|
||||
}
|
||||
}
|
||||
if (!didError) {
|
||||
const isRefLValue = isUseRefType(instr.lvalue.identifier);
|
||||
for (const operand of eachInstructionValueOperand(instr.value)) {
|
||||
if (hookKind != null) {
|
||||
validateNoDirectRefValueAccess(errors, operand, env);
|
||||
}
|
||||
else {
|
||||
else if (!isRefLValue) {
|
||||
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-79dc7064-20250729",
|
||||
"version": "0.0.0-experimental-1d7e942d-20250729",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/react.git",
|
||||
|
||||
Reference in New Issue
Block a user