Skip to content

Commit

Permalink
remove unstable_renderSubtreeIntoContainer (#29771)
Browse files Browse the repository at this point in the history
remove unstable_renderSubtreeIntoContainer

This is finally no longer used and can be deleted.

DiffTrain build for [93826c8](93826c8)
  • Loading branch information
kassens committed Jun 12, 2024
1 parent 25dfa8e commit 7000bd3
Show file tree
Hide file tree
Showing 35 changed files with 80 additions and 296 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
383b2a18456215d2d3ec46f33c0c912e84efa08f
93826c8483ffaf6676c437c25619d82f13444413
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
383b2a18456215d2d3ec46f33c0c912e84efa08f
93826c8483ffaf6676c437c25619d82f13444413
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-383b2a1845-20240611";
exports.version = "19.0.0-www-classic-93826c8483-20240612";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-383b2a1845-20240611";
exports.version = "19.0.0-www-modern-93826c8483-20240612";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-383b2a1845-20240611";
exports.version = "19.0.0-www-classic-93826c8483-20240612";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-383b2a1845-20240611";
exports.version = "19.0.0-www-modern-93826c8483-20240612";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-383b2a1845-20240611";
exports.version = "19.0.0-www-classic-93826c8483-20240612";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-383b2a1845-20240611";
exports.version = "19.0.0-www-modern-93826c8483-20240612";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
12 changes: 2 additions & 10 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -16415,14 +16415,6 @@ __DEV__ &&
var didWarnAboutContextTypeAndContextTypes = new Set();
var didWarnAboutInvalidateContextType = new Set();
var didWarnOnInvalidCallback = new Set();
Object.defineProperty(fakeInternalInstance, "_processChildContext", {
enumerable: !1,
value: function () {
throw Error(
"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal)."
);
}
});
Object.freeze(fakeInternalInstance);
var classComponentUpdater = {
isMounted: function (component) {
Expand Down Expand Up @@ -16942,14 +16934,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-383b2a1845-20240611"
reconcilerVersion: "19.0.0-www-classic-93826c8483-20240612"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-classic-383b2a1845-20240611",
version: "19.0.0-www-classic-93826c8483-20240612",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
Expand Down
12 changes: 2 additions & 10 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -15846,14 +15846,6 @@ __DEV__ &&
var didWarnAboutUndefinedDerivedState = new Set();
var didWarnAboutInvalidateContextType = new Set();
var didWarnOnInvalidCallback = new Set();
Object.defineProperty(fakeInternalInstance, "_processChildContext", {
enumerable: !1,
value: function () {
throw Error(
"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal)."
);
}
});
Object.freeze(fakeInternalInstance);
var classComponentUpdater = {
isMounted: function (component) {
Expand Down Expand Up @@ -16372,14 +16364,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-383b2a1845-20240611"
reconcilerVersion: "19.0.0-www-modern-93826c8483-20240612"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-modern-383b2a1845-20240611",
version: "19.0.0-www-modern-93826c8483-20240612",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -10709,7 +10709,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-classic-383b2a1845-20240611",
version: "19.0.0-www-classic-93826c8483-20240612",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1386 = {
Expand Down Expand Up @@ -10740,7 +10740,7 @@ var internals$jscomp$inline_1386 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-383b2a1845-20240611"
reconcilerVersion: "19.0.0-www-classic-93826c8483-20240612"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1387 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -10162,7 +10162,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-modern-383b2a1845-20240611",
version: "19.0.0-www-modern-93826c8483-20240612",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1372 = {
Expand Down Expand Up @@ -10193,7 +10193,7 @@ var internals$jscomp$inline_1372 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-383b2a1845-20240611"
reconcilerVersion: "19.0.0-www-modern-93826c8483-20240612"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1373 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
46 changes: 5 additions & 41 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -26260,14 +26260,6 @@ __DEV__ &&
var didWarnAboutContextTypeAndContextTypes = new Set();
var didWarnAboutInvalidateContextType = new Set();
var didWarnOnInvalidCallback = new Set();
Object.defineProperty(fakeInternalInstance, "_processChildContext", {
enumerable: !1,
value: function () {
throw Error(
"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal)."
);
}
});
Object.freeze(fakeInternalInstance);
var classComponentUpdater = {
isMounted: function (component) {
Expand Down Expand Up @@ -27358,11 +27350,11 @@ __DEV__ &&
: flushSyncErrorInBuildsThatSupportLegacyMode;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-classic-383b2a1845-20240611" !== isomorphicReactPackageVersion)
if ("19.0.0-www-classic-93826c8483-20240612" !== 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.0.0-www-classic-383b2a1845-20240611\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-classic-93826c8483-20240612\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27428,12 +27420,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-383b2a1845-20240611"
reconcilerVersion: "19.0.0-www-classic-93826c8483-20240612"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-classic-383b2a1845-20240611",
version: "19.0.0-www-classic-93826c8483-20240612",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
Expand Down Expand Up @@ -28069,42 +28061,14 @@ __DEV__ &&
"boolean" === typeof options && (isCapturePhaseListener = options));
return eventHandle;
};
exports.unstable_renderSubtreeIntoContainer = function (
parentComponent,
element,
containerNode,
callback
) {
if (disableLegacyMode)
throw (
(error$jscomp$0(
"ReactDOM.unstable_renderSubtreeIntoContainer() was removed in React 19. Consider using a portal instead."
),
Error("ReactDOM: Unsupported Legacy Mode API."))
);
error$jscomp$0(
"ReactDOM.unstable_renderSubtreeIntoContainer() has not been supported since React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://react.dev/link/switch-to-createroot"
);
if (!isValidContainerLegacy(containerNode))
throw Error("Target container is not a DOM element.");
if (null == parentComponent || void 0 === parentComponent._reactInternals)
throw Error("parentComponent must be a valid React Component");
return legacyRenderSubtreeIntoContainer(
parentComponent,
element,
containerNode,
!1,
callback
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.useFormState = function (action, initialState, permalink) {
return resolveDispatcher().useFormState(action, initialState, permalink);
};
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-383b2a1845-20240611";
exports.version = "19.0.0-www-classic-93826c8483-20240612";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
24 changes: 5 additions & 19 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -25408,14 +25408,6 @@ __DEV__ &&
var didWarnAboutUndefinedDerivedState = new Set();
var didWarnAboutInvalidateContextType = new Set();
var didWarnOnInvalidCallback = new Set();
Object.defineProperty(fakeInternalInstance, "_processChildContext", {
enumerable: !1,
value: function () {
throw Error(
"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal)."
);
}
});
Object.freeze(fakeInternalInstance);
var classComponentUpdater = {
isMounted: function (component) {
Expand Down Expand Up @@ -26505,11 +26497,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-modern-383b2a1845-20240611" !== isomorphicReactPackageVersion)
if ("19.0.0-www-modern-93826c8483-20240612" !== 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.0.0-www-modern-383b2a1845-20240611\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-modern-93826c8483-20240612\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -26574,12 +26566,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-383b2a1845-20240611"
reconcilerVersion: "19.0.0-www-modern-93826c8483-20240612"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-modern-383b2a1845-20240611",
version: "19.0.0-www-modern-93826c8483-20240612",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
Expand Down Expand Up @@ -27168,20 +27160,14 @@ __DEV__ &&
"boolean" === typeof options && (isCapturePhaseListener = options));
return eventHandle;
};
exports.unstable_renderSubtreeIntoContainer = function () {
error$jscomp$0(
"ReactDOM.unstable_renderSubtreeIntoContainer() was removed in React 19. Consider using a portal instead."
);
throw Error("ReactDOM: Unsupported Legacy Mode API.");
};
exports.unstable_runWithPriority = runWithPriority;
exports.useFormState = function (action, initialState, permalink) {
return resolveDispatcher().useFormState(action, initialState, permalink);
};
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-383b2a1845-20240611";
exports.version = "19.0.0-www-modern-93826c8483-20240612";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
29 changes: 5 additions & 24 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17149,14 +17149,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1769 = React.version;
if (
"19.0.0-www-classic-383b2a1845-20240611" !==
"19.0.0-www-classic-93826c8483-20240612" !==
isomorphicReactPackageVersion$jscomp$inline_1769
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1769,
"19.0.0-www-classic-383b2a1845-20240611"
"19.0.0-www-classic-93826c8483-20240612"
)
);
function flushSyncFromReconciler(fn) {
Expand Down Expand Up @@ -17202,7 +17202,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1776 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-383b2a1845-20240611",
version: "19.0.0-www-classic-93826c8483-20240612",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2220 = {
Expand Down Expand Up @@ -17232,7 +17232,7 @@ var internals$jscomp$inline_2220 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-383b2a1845-20240611"
reconcilerVersion: "19.0.0-www-classic-93826c8483-20240612"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2221 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17689,30 +17689,11 @@ exports.unstable_createEventHandle = function (type, options) {
"boolean" === typeof options && (isCapturePhaseListener = options));
return eventHandle;
};
exports.unstable_renderSubtreeIntoContainer = function (
parentComponent,
element,
containerNode,
callback
) {
if (disableLegacyMode) throw Error(formatProdErrorMessage(509));
if (!isValidContainerLegacy(containerNode))
throw Error(formatProdErrorMessage(299));
if (null == parentComponent || void 0 === parentComponent._reactInternals)
throw Error(formatProdErrorMessage(38));
return legacyRenderSubtreeIntoContainer(
parentComponent,
element,
containerNode,
!1,
callback
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.useFormState = function (action, initialState, permalink) {
return ReactSharedInternals.H.useFormState(action, initialState, permalink);
};
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-383b2a1845-20240611";
exports.version = "19.0.0-www-classic-93826c8483-20240612";
Loading

0 comments on commit 7000bd3

Please sign in to comment.