mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove startTransition and useActionState from react-server condition of react (#29753)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary Remove `startTransition` and `useActionState` from `react-server` condition of react, as they should only stay in client bundle. This will reduce the server bundle of react itself. Found this while tracing where the `process.emit` was called. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. --> DiffTrain build for commit https://github.com/facebook/react/commit/9185b9b1e4a716f90774c4c5501fe3925bc7c402.
This commit is contained in:
@@ -1 +1 @@
|
||||
19.0.0-native-fb-a26e90c29c-20240604
|
||||
19.0.0-native-fb-9185b9b1e4-20240604
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<ae2e152b287aa3448cf7d66dac0cf48a>>
|
||||
* @generated SignedSource<<ea75ea9613da3d2148dcb675e26da316>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -23580,7 +23580,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = '19.0.0-native-fb-a26e90c29c-20240604';
|
||||
var ReactVersion = '19.0.0-native-fb-9185b9b1e4-20240604';
|
||||
|
||||
/*
|
||||
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<d8b56a907c531061ecec4e7ef9d06af1>>
|
||||
* @generated SignedSource<<af2ca61b2ffeb3b683c4615cf885cebf>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -9336,7 +9336,7 @@ var devToolsConfig$jscomp$inline_1048 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "19.0.0-native-fb-a26e90c29c-20240604",
|
||||
version: "19.0.0-native-fb-9185b9b1e4-20240604",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
var internals$jscomp$inline_1235 = {
|
||||
@@ -9367,7 +9367,7 @@ var internals$jscomp$inline_1235 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-native-fb-a26e90c29c-20240604"
|
||||
reconcilerVersion: "19.0.0-native-fb-9185b9b1e4-20240604"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1236 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<f1e0294b882ff59a78948de1418ad52f>>
|
||||
* @generated SignedSource<<53173415e411d2454d4825a7e99ba296>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -9958,7 +9958,7 @@ var devToolsConfig$jscomp$inline_1131 = {
|
||||
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "19.0.0-native-fb-a26e90c29c-20240604",
|
||||
version: "19.0.0-native-fb-9185b9b1e4-20240604",
|
||||
rendererPackageName: "react-test-renderer"
|
||||
};
|
||||
(function (internals) {
|
||||
@@ -10002,7 +10002,7 @@ var devToolsConfig$jscomp$inline_1131 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-native-fb-a26e90c29c-20240604"
|
||||
reconcilerVersion: "19.0.0-native-fb-9185b9b1e4-20240604"
|
||||
});
|
||||
exports._Scheduler = Scheduler;
|
||||
exports.act = act;
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<b2644209867f5ec4f2bd9a04998c1ee3>>
|
||||
* @generated SignedSource<<ecec746b6b704d12e3d87e7170d4817d>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -24,7 +24,7 @@ if (
|
||||
}
|
||||
var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags');
|
||||
|
||||
var ReactVersion = '19.0.0-native-fb-a26e90c29c-20240604';
|
||||
var ReactVersion = '19.0.0-native-fb-9185b9b1e4-20240604';
|
||||
|
||||
// Re-export dynamic flags from the internal module.
|
||||
var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<9c73f2844aefc36a622a2268ed3ec892>>
|
||||
* @generated SignedSource<<0e93f3cbafa2848a76f1daba1186fe57>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -604,4 +604,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactSharedInternals.H.useTransition();
|
||||
};
|
||||
exports.version = "19.0.0-native-fb-a26e90c29c-20240604";
|
||||
exports.version = "19.0.0-native-fb-9185b9b1e4-20240604";
|
||||
|
||||
Vendored
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<acaf8cb87e6f0efd4063121fbadcb9e5>>
|
||||
* @generated SignedSource<<6a4c8c16ae36d66d52f03e58b6962a29>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -608,7 +608,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactSharedInternals.H.useTransition();
|
||||
};
|
||||
exports.version = "19.0.0-native-fb-a26e90c29c-20240604";
|
||||
exports.version = "19.0.0-native-fb-9185b9b1e4-20240604";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
a26e90c29cfa841d3e2bc08876c5929d5680fb6d
|
||||
9185b9b1e4a716f90774c4c5501fe3925bc7c402
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<237c95541e4cd66f892d939d9f01ba19>>
|
||||
* @generated SignedSource<<24a833c07531f67100ef2da060b7e5ca>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -26315,7 +26315,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = '19.0.0-rc-a26e90c29c-20240604';
|
||||
var ReactVersion = '19.0.0-rc-9185b9b1e4-20240604';
|
||||
|
||||
/*
|
||||
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<08d29097ef8f04ec1e655d4321922476>>
|
||||
* @generated SignedSource<<2a766f06b0f83eea3e0443173abaad9c>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -10589,7 +10589,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1125 = {
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-rc-a26e90c29c-20240604",
|
||||
version: "19.0.0-rc-9185b9b1e4-20240604",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -10632,7 +10632,7 @@ var internals$jscomp$inline_1351 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-rc-a26e90c29c-20240604"
|
||||
reconcilerVersion: "19.0.0-rc-9185b9b1e4-20240604"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1352 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<ea6749d034bf84d1c394552dde5b27c0>>
|
||||
* @generated SignedSource<<e08d7764f9ddc360e306713fc5e2fdaa>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -11295,7 +11295,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1206 = {
|
||||
findFiberByHostInstance: getInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-rc-a26e90c29c-20240604",
|
||||
version: "19.0.0-rc-9185b9b1e4-20240604",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -11351,7 +11351,7 @@ var roots = new Map(),
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-rc-a26e90c29c-20240604"
|
||||
reconcilerVersion: "19.0.0-rc-9185b9b1e4-20240604"
|
||||
});
|
||||
exports.createPortal = function (children, containerTag) {
|
||||
return createPortal$1(
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<1d4b6b7a087f58fe9d0931fc9cecf081>>
|
||||
* @generated SignedSource<<ecdd13a1ecffafb37ccef00218eda8a1>>
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -26671,7 +26671,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = '19.0.0-rc-a26e90c29c-20240604';
|
||||
var ReactVersion = '19.0.0-rc-9185b9b1e4-20240604';
|
||||
|
||||
/*
|
||||
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
|
||||
|
||||
+5
-5
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<8eeeb760b158fffa5b0951fe05db4bd3>>
|
||||
* @generated SignedSource<<df9eef25d978d5ad82a6f225311c1ac0>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -10734,11 +10734,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
|
||||
traverseOwnerTreeUp(hierarchy, instance);
|
||||
}
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.0.0-rc-a26e90c29c-20240604" !== isomorphicReactPackageVersion)
|
||||
if ("19.0.0-rc-9185b9b1e4-20240604" !== 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.0.0-rc-a26e90c29c-20240604\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-native-renderer: 19.0.0-rc-9185b9b1e4-20240604\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
);
|
||||
if (
|
||||
"function" !==
|
||||
@@ -10788,7 +10788,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1193 = {
|
||||
findFiberByHostInstance: getInstanceFromTag,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-rc-a26e90c29c-20240604",
|
||||
version: "19.0.0-rc-9185b9b1e4-20240604",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -10831,7 +10831,7 @@ var internals$jscomp$inline_1440 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-rc-a26e90c29c-20240604"
|
||||
reconcilerVersion: "19.0.0-rc-9185b9b1e4-20240604"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1441 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
|
||||
+5
-5
@@ -7,7 +7,7 @@
|
||||
* @noflow
|
||||
* @nolint
|
||||
* @preventMunge
|
||||
* @generated SignedSource<<cb2e606e6cf089d8427b61200798a824>>
|
||||
* @generated SignedSource<<9f0541bd0d829030a285d35b44e58bbd>>
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
@@ -11441,11 +11441,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
|
||||
traverseOwnerTreeUp(hierarchy, instance);
|
||||
}
|
||||
var isomorphicReactPackageVersion = React.version;
|
||||
if ("19.0.0-rc-a26e90c29c-20240604" !== isomorphicReactPackageVersion)
|
||||
if ("19.0.0-rc-9185b9b1e4-20240604" !== 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.0.0-rc-a26e90c29c-20240604\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
"\n - react-native-renderer: 19.0.0-rc-9185b9b1e4-20240604\nLearn more: https://react.dev/warnings/version-mismatch")
|
||||
);
|
||||
if (
|
||||
"function" !==
|
||||
@@ -11495,7 +11495,7 @@ var roots = new Map(),
|
||||
devToolsConfig$jscomp$inline_1274 = {
|
||||
findFiberByHostInstance: getInstanceFromTag,
|
||||
bundleType: 0,
|
||||
version: "19.0.0-rc-a26e90c29c-20240604",
|
||||
version: "19.0.0-rc-9185b9b1e4-20240604",
|
||||
rendererPackageName: "react-native-renderer",
|
||||
rendererConfig: {
|
||||
getInspectorDataForInstance: getInspectorDataForInstance,
|
||||
@@ -11551,7 +11551,7 @@ var roots = new Map(),
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-rc-a26e90c29c-20240604"
|
||||
reconcilerVersion: "19.0.0-rc-9185b9b1e4-20240604"
|
||||
});
|
||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
|
||||
computeComponentStackForErrorReporting: function (reactTag) {
|
||||
|
||||
Reference in New Issue
Block a user