Skip to content

Commit

Permalink
[DOM] disable legacy mode behind flag (#28468)
Browse files Browse the repository at this point in the history
Adds a flag to disable legacy mode. Currently this flag is used to cause
legacy mode apis like render and hydrate to throw. This change also
removes render, hydrate, unmountComponentAtNode, and
unstable_renderSubtreeIntoContainer from the experiemntal entrypoint.
Right now for Meta builds this flag is off (legacy mode is still
supported). In OSS builds this flag matches __NEXT_MAJOR__ which means
it currently is on in experiemental. This means that after merging
legacy mode is effectively removed from experimental builds. While this
is a breaking change, experimental builds are not stable and users can
pin to older versions or update their use of react-dom to no longer use
legacy mode APIs.

DiffTrain build for [1c02b9d](1c02b9d)
  • Loading branch information
gnoff committed Mar 4, 2024
1 parent fb789a0 commit 54b3557
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
034130c02ffb47b0026059b57d17e9b080976ff3
1c02b9d2bdc18091cc6afec810fc1b361f00abdd
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "18.3.0-www-modern-b085b614";
var ReactVersion = "18.3.0-www-modern-b6d2fca1";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ if (__DEV__) {
}
}

var assign = Object.assign;

// Re-export dynamic flags from the www version.
var dynamicFeatureFlags = require("ReactFeatureFlags");

Expand Down Expand Up @@ -155,6 +153,8 @@ if (__DEV__) {
var enableSuspenseCallback = true;
var enableBigIntSupport = false; // TODO: Roll out with GK. Don't keep as dynamic flag for too long, though,

var assign = Object.assign;

var ReactSharedInternals =
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

Expand Down Expand Up @@ -35882,7 +35882,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "18.3.0-www-modern-ea38075a";
var ReactVersion = "18.3.0-www-modern-0ae1c4c8";

function createPortal$1(
children,
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ function formatProdErrorMessage(code) {
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
);
}
var assign = Object.assign,
dynamicFeatureFlags = require("ReactFeatureFlags"),
var dynamicFeatureFlags = require("ReactFeatureFlags"),
disableInputAttributeSyncing =
dynamicFeatureFlags.disableInputAttributeSyncing,
disableIEWorkarounds = dynamicFeatureFlags.disableIEWorkarounds,
Expand Down Expand Up @@ -69,6 +68,7 @@ var assign = Object.assign,
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp,
enableClientRenderFallbackOnTextMismatch =
dynamicFeatureFlags.enableClientRenderFallbackOnTextMismatch,
assign = Object.assign,
ReactSharedInternals =
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
Expand Down Expand Up @@ -16745,7 +16745,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1778 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-f9cff7f4",
version: "18.3.0-www-modern-36a10701",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2142 = {
Expand Down Expand Up @@ -16776,7 +16776,7 @@ var internals$jscomp$inline_2142 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-f9cff7f4"
reconcilerVersion: "18.3.0-www-modern-36a10701"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2143 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17047,4 +17047,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-modern-f9cff7f4";
exports.version = "18.3.0-www-modern-36a10701";
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ function formatProdErrorMessage(code) {
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
);
}
var assign = Object.assign,
dynamicFeatureFlags = require("ReactFeatureFlags"),
var dynamicFeatureFlags = require("ReactFeatureFlags"),
disableInputAttributeSyncing =
dynamicFeatureFlags.disableInputAttributeSyncing,
disableIEWorkarounds = dynamicFeatureFlags.disableIEWorkarounds,
Expand Down Expand Up @@ -76,6 +75,7 @@ var assign = Object.assign,
enableProfilerNestedUpdateScheduledHook =
dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook,
enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler,
assign = Object.assign,
ReactSharedInternals =
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
Expand Down Expand Up @@ -17508,7 +17508,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1863 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-b085b614",
version: "18.3.0-www-modern-b6d2fca1",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -17553,7 +17553,7 @@ var devToolsConfig$jscomp$inline_1863 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-b085b614"
reconcilerVersion: "18.3.0-www-modern-b6d2fca1"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function (children, container) {
Expand Down Expand Up @@ -17811,7 +17811,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-modern-b085b614";
exports.version = "18.3.0-www-modern-b6d2fca1";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
6 changes: 3 additions & 3 deletions compiled/facebook-www/ReactDOMTesting-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ if (__DEV__) {
}
}

var assign = Object.assign;

// Re-export dynamic flags from the www version.
var dynamicFeatureFlags = require("ReactFeatureFlags");

Expand Down Expand Up @@ -147,6 +145,8 @@ if (__DEV__) {
var enableSuspenseCallback = true;
var enableBigIntSupport = false; // TODO: Roll out with GK. Don't keep as dynamic flag for too long, though,

var assign = Object.assign;

var ReactSharedInternals =
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

Expand Down Expand Up @@ -36506,7 +36506,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "18.3.0-www-modern-f3f947b8";
var ReactVersion = "18.3.0-www-modern-0f53a2dd";

function createPortal$1(
children,
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOMTesting-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ function formatProdErrorMessage(code) {
" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
);
}
var assign = Object.assign,
dynamicFeatureFlags = require("ReactFeatureFlags"),
var dynamicFeatureFlags = require("ReactFeatureFlags"),
disableInputAttributeSyncing =
dynamicFeatureFlags.disableInputAttributeSyncing,
disableIEWorkarounds = dynamicFeatureFlags.disableIEWorkarounds,
Expand Down Expand Up @@ -69,6 +68,7 @@ var assign = Object.assign,
enableRefAsProp = dynamicFeatureFlags.enableRefAsProp,
enableClientRenderFallbackOnTextMismatch =
dynamicFeatureFlags.enableClientRenderFallbackOnTextMismatch,
assign = Object.assign,
ReactSharedInternals =
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
Expand Down Expand Up @@ -17135,7 +17135,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1783 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-e6aaf239",
version: "18.3.0-www-modern-86032fe1",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2153 = {
Expand Down Expand Up @@ -17166,7 +17166,7 @@ var internals$jscomp$inline_2153 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-e6aaf239"
reconcilerVersion: "18.3.0-www-modern-86032fe1"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2154 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17587,4 +17587,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-modern-e6aaf239";
exports.version = "18.3.0-www-modern-86032fe1";
3 changes: 3 additions & 0 deletions compiled/facebook-www/__test_utils__/ReactAllWarnings.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 54b3557

Please sign in to comment.