Skip to content

Commit a6fab21

Browse files
rickhanloniimeta-codesync[bot]
authored andcommitted
remove isomorphic version checks from legacy react native renderers (#54232)
Summary: Pull Request resolved: #54232 We're not syncing the legacy renderers, which means the React package will continue to move forward while these stay frozen. That means we need to remove the version compatibility checks between react and the legacy ReactNativeRenderers. Changelog: [Internal] Reviewed By: cortinico, cipolleschi Differential Revision: D85248891 fbshipit-source-id: 19e0812c59f69301e2666e6272c10ac56ecbde1f
1 parent 5fcbd64 commit a6fab21

File tree

4 files changed

+9
-28
lines changed

4 files changed

+9
-28
lines changed

packages/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<90e5b8f55761c6a4805052d5b49689b8>>
1110
*
12-
* This file was sync'd from the facebook/react repository.
11+
* This file is no longer sync'd from the facebook/react repository.
12+
* The version compatability check is removed. Use at your own risk.
1313
*/
1414

1515
"use strict";
@@ -19455,13 +19455,6 @@ __DEV__ &&
1945519455
setSuspenseHandler = function (newShouldSuspendImpl) {
1945619456
shouldSuspendImpl = newShouldSuspendImpl;
1945719457
};
19458-
var isomorphicReactPackageVersion = React.version;
19459-
if ("19.2.0" !== isomorphicReactPackageVersion)
19460-
throw Error(
19461-
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
19462-
(isomorphicReactPackageVersion +
19463-
"\n - react-native-renderer: 19.2.0\nLearn more: https://react.dev/warnings/version-mismatch")
19464-
);
1946519458
if (
1946619459
"function" !==
1946719460
typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog

packages/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<14f9eca680f3065d18eda114fb4bea9f>>
1110
*
12-
* This file was sync'd from the facebook/react repository.
11+
* This file is no longer sync'd from the facebook/react repository.
12+
* The version compatability check is removed. Use at your own risk.
1313
*/
1414

1515
"use strict";
@@ -10918,13 +10918,6 @@ function updateContainer(element, container, parentComponent, callback) {
1091810918
entangleTransitions(element, parentComponent, lane));
1091910919
return lane;
1092010920
}
10921-
var isomorphicReactPackageVersion = React.version;
10922-
if ("19.2.0" !== isomorphicReactPackageVersion)
10923-
throw Error(
10924-
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
10925-
(isomorphicReactPackageVersion +
10926-
"\n - react-native-renderer: 19.2.0\nLearn more: https://react.dev/warnings/version-mismatch")
10927-
);
1092810921
if (
1092910922
"function" !==
1093010923
typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog

packages/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<238b7d9e5ffe0f30b64b3b5c7c156088>>
1110
*
12-
* This file was sync'd from the facebook/react repository.
11+
* This file is no longer sync'd from the facebook/react repository.
12+
* The version compatability check is removed. Use at your own risk.
1313
*/
1414

1515
"use strict";
@@ -12713,13 +12713,6 @@ function updateContainer(element, container, parentComponent, callback) {
1271312713
entangleTransitions(element, parentComponent, lane));
1271412714
return lane;
1271512715
}
12716-
var isomorphicReactPackageVersion = React.version;
12717-
if ("19.2.0" !== isomorphicReactPackageVersion)
12718-
throw Error(
12719-
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
12720-
(isomorphicReactPackageVersion +
12721-
"\n - react-native-renderer: 19.2.0\nLearn more: https://react.dev/warnings/version-mismatch")
12722-
);
1272312716
if (
1272412717
"function" !==
1272512718
typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog

packages/react-native/Libraries/Renderer/shims/ReactNative.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
* @noformat
88
* @nolint
99
* @flow
10-
* @generated SignedSource<<8f46fdc9267fcc4fdc9e76842fe24066>>
10+
*
11+
* This file is no longer sync'd from the facebook/react repository.
12+
* The version compatability check is removed. Use at your own risk.
1113
*/
1214
'use strict';
1315

0 commit comments

Comments
 (0)