Skip to content

Commit

Permalink
Remove propTypes on instance warning (#30296)
Browse files Browse the repository at this point in the history
`propTypes` are no longer supported at all in React 19, remove this
outdated warning.

DiffTrain build for [ba95cf4](ba95cf4)
  • Loading branch information
kassens committed Jul 9, 2024
1 parent 14213c5 commit 5c54f84
Show file tree
Hide file tree
Showing 36 changed files with 80 additions and 146 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
274c980c535bb34e17f5d97cc22ef4dd296ab413
ba95cf4b8f39acfd7c0ccf2795a19430d35ea6b3
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION_TRANSFORMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
274c980c535bb34e17f5d97cc22ef4dd296ab413
ba95cf4b8f39acfd7c0ccf2795a19430d35ea6b3
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 @@ -1998,7 +1998,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-classic-274c980c53-20240708";
exports.version = "19.0.0-www-classic-ba95cf4b8f-20240709";
"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 @@ -1978,7 +1978,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-www-modern-274c980c53-20240708";
exports.version = "19.0.0-www-modern-ba95cf4b8f-20240709";
"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 @@ -669,4 +669,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-274c980c53-20240708";
exports.version = "19.0.0-www-classic-ba95cf4b8f-20240709";
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 @@ -669,4 +669,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-274c980c53-20240708";
exports.version = "19.0.0-www-modern-ba95cf4b8f-20240709";
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 @@ -673,7 +673,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-classic-274c980c53-20240708";
exports.version = "19.0.0-www-classic-ba95cf4b8f-20240709";
"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 @@ -673,7 +673,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-www-modern-274c980c53-20240708";
exports.version = "19.0.0-www-modern-ba95cf4b8f-20240709";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
9 changes: 2 additions & 7 deletions compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -5778,11 +5778,6 @@ __DEV__ &&
"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",
name
);
instance.propTypes &&
error$jscomp$0(
"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",
name
);
instance.contextType &&
error$jscomp$0(
"contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
Expand Down Expand Up @@ -16942,14 +16937,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-274c980c53-20240708"
reconcilerVersion: "19.0.0-www-classic-ba95cf4b8f-20240709"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-classic-274c980c53-20240708",
version: "19.0.0-www-classic-ba95cf4b8f-20240709",
rendererPackageName: "react-art"
});
var ClippingRectangle = TYPES.CLIPPING_RECTANGLE,
Expand Down
9 changes: 2 additions & 7 deletions compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -6454,11 +6454,6 @@ __DEV__ &&
"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",
state
);
_instance.propTypes &&
error$jscomp$0(
"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",
state
);
_instance.contextType &&
error$jscomp$0(
"contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
Expand Down Expand Up @@ -16372,14 +16367,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-274c980c53-20240708"
reconcilerVersion: "19.0.0-www-modern-ba95cf4b8f-20240709"
});
})({
findFiberByHostInstance: function () {
return null;
},
bundleType: 1,
version: "19.0.0-www-modern-274c980c53-20240708",
version: "19.0.0-www-modern-ba95cf4b8f-20240709",
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 @@ -10718,7 +10718,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-classic-274c980c53-20240708",
version: "19.0.0-www-classic-ba95cf4b8f-20240709",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1386 = {
Expand Down Expand Up @@ -10749,7 +10749,7 @@ var internals$jscomp$inline_1386 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-274c980c53-20240708"
reconcilerVersion: "19.0.0-www-classic-ba95cf4b8f-20240709"
};
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 @@ -10171,7 +10171,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "19.0.0-www-modern-274c980c53-20240708",
version: "19.0.0-www-modern-ba95cf4b8f-20240709",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1372 = {
Expand Down Expand Up @@ -10202,7 +10202,7 @@ var internals$jscomp$inline_1372 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-274c980c53-20240708"
reconcilerVersion: "19.0.0-www-modern-ba95cf4b8f-20240709"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1373 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
15 changes: 5 additions & 10 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -7561,11 +7561,6 @@ __DEV__ &&
"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",
name
);
instance.propTypes &&
error$jscomp$0(
"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",
name
);
instance.contextType &&
error$jscomp$0(
"contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
Expand Down Expand Up @@ -27378,11 +27373,11 @@ __DEV__ &&
: flushSyncErrorInBuildsThatSupportLegacyMode;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-classic-274c980c53-20240708" !== isomorphicReactPackageVersion)
if ("19.0.0-www-classic-ba95cf4b8f-20240709" !== 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-274c980c53-20240708\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-classic-ba95cf4b8f-20240709\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -27448,12 +27443,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-classic-274c980c53-20240708"
reconcilerVersion: "19.0.0-www-classic-ba95cf4b8f-20240709"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-classic-274c980c53-20240708",
version: "19.0.0-www-classic-ba95cf4b8f-20240709",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
Expand Down Expand Up @@ -28096,7 +28091,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-274c980c53-20240708";
exports.version = "19.0.0-www-classic-ba95cf4b8f-20240709";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
15 changes: 5 additions & 10 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -8287,11 +8287,6 @@ __DEV__ &&
"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",
state
);
_instance.propTypes &&
error$jscomp$0(
"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",
state
);
_instance.contextType &&
error$jscomp$0(
"contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
Expand Down Expand Up @@ -26525,11 +26520,11 @@ __DEV__ &&
return_targetInst = null;
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-www-modern-274c980c53-20240708" !== isomorphicReactPackageVersion)
if ("19.0.0-www-modern-ba95cf4b8f-20240709" !== 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-274c980c53-20240708\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.0.0-www-modern-ba95cf4b8f-20240709\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -26594,12 +26589,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-www-modern-274c980c53-20240708"
reconcilerVersion: "19.0.0-www-modern-ba95cf4b8f-20240709"
});
})({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: "19.0.0-www-modern-274c980c53-20240708",
version: "19.0.0-www-modern-ba95cf4b8f-20240709",
rendererPackageName: "react-dom"
}) &&
canUseDOM &&
Expand Down Expand Up @@ -27195,7 +27190,7 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-274c980c53-20240708";
exports.version = "19.0.0-www-modern-ba95cf4b8f-20240709";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17163,14 +17163,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1769 = React.version;
if (
"19.0.0-www-classic-274c980c53-20240708" !==
"19.0.0-www-classic-ba95cf4b8f-20240709" !==
isomorphicReactPackageVersion$jscomp$inline_1769
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1769,
"19.0.0-www-classic-274c980c53-20240708"
"19.0.0-www-classic-ba95cf4b8f-20240709"
)
);
function flushSyncFromReconciler(fn) {
Expand Down Expand Up @@ -17216,7 +17216,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1776 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-274c980c53-20240708",
version: "19.0.0-www-classic-ba95cf4b8f-20240709",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2220 = {
Expand Down Expand Up @@ -17246,7 +17246,7 @@ var internals$jscomp$inline_2220 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-274c980c53-20240708"
reconcilerVersion: "19.0.0-www-classic-ba95cf4b8f-20240709"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2221 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17710,4 +17710,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-274c980c53-20240708";
exports.version = "19.0.0-www-classic-ba95cf4b8f-20240709";
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 @@ -16478,14 +16478,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1740 = React.version;
if (
"19.0.0-www-modern-274c980c53-20240708" !==
"19.0.0-www-modern-ba95cf4b8f-20240709" !==
isomorphicReactPackageVersion$jscomp$inline_1740
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1740,
"19.0.0-www-modern-274c980c53-20240708"
"19.0.0-www-modern-ba95cf4b8f-20240709"
)
);
Internals.findDOMNode = function (componentOrElement) {
Expand All @@ -16504,7 +16504,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1742 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-modern-274c980c53-20240708",
version: "19.0.0-www-modern-ba95cf4b8f-20240709",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2211 = {
Expand Down Expand Up @@ -16534,7 +16534,7 @@ var internals$jscomp$inline_2211 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-modern-274c980c53-20240708"
reconcilerVersion: "19.0.0-www-modern-ba95cf4b8f-20240709"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2212 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16905,4 +16905,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-modern-274c980c53-20240708";
exports.version = "19.0.0-www-modern-ba95cf4b8f-20240709";
10 changes: 5 additions & 5 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -17930,14 +17930,14 @@ function getCrossOriginStringAs(as, input) {
}
var isomorphicReactPackageVersion$jscomp$inline_1856 = React.version;
if (
"19.0.0-www-classic-274c980c53-20240708" !==
"19.0.0-www-classic-ba95cf4b8f-20240709" !==
isomorphicReactPackageVersion$jscomp$inline_1856
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1856,
"19.0.0-www-classic-274c980c53-20240708"
"19.0.0-www-classic-ba95cf4b8f-20240709"
)
);
function flushSyncFromReconciler(fn) {
Expand Down Expand Up @@ -17983,7 +17983,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1863 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "19.0.0-www-classic-274c980c53-20240708",
version: "19.0.0-www-classic-ba95cf4b8f-20240709",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -18027,7 +18027,7 @@ var devToolsConfig$jscomp$inline_1863 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-www-classic-274c980c53-20240708"
reconcilerVersion: "19.0.0-www-classic-ba95cf4b8f-20240709"
});
function ReactDOMRoot(internalRoot) {
this._internalRoot = internalRoot;
Expand Down Expand Up @@ -18478,7 +18478,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.0.0-www-classic-274c980c53-20240708";
exports.version = "19.0.0-www-classic-ba95cf4b8f-20240709";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Loading

0 comments on commit 5c54f84

Please sign in to comment.