Skip to content

Commit

Permalink
Remove deprecated methods from react-is (#28224)
Browse files Browse the repository at this point in the history
These aren't being used anywhere and don't even correspond to real APIs.

DiffTrain build for [35b2c28](35b2c28)
  • Loading branch information
gaearon committed Feb 11, 2024
1 parent e0e832e commit 9adade5
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 79 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d8c1fa6b0b8da0512cb5acab9cd4f242451392f3
35b2c28178bf4f79898d11dce0bc2a7ce675f670
33 changes: 0 additions & 33 deletions compiled/facebook-www/ReactIs-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,37 +139,6 @@ if (__DEV__) {
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false;
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated

function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint

console["warn"](
"The ReactIs.isAsyncMode() alias has been deprecated, " +
"and will be removed in React 18+."
);
}
}

return false;
}
function isConcurrentMode(object) {
{
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint

console["warn"](
"The ReactIs.isConcurrentMode() alias has been deprecated, " +
"and will be removed in React 18+."
);
}
}

return false;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
Expand Down Expand Up @@ -223,8 +192,6 @@ if (__DEV__) {
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.SuspenseList = SuspenseList;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
Expand Down
33 changes: 0 additions & 33 deletions compiled/facebook-www/ReactIs-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,37 +139,6 @@ if (__DEV__) {
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false;
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated

function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint

console["warn"](
"The ReactIs.isAsyncMode() alias has been deprecated, " +
"and will be removed in React 18+."
);
}
}

return false;
}
function isConcurrentMode(object) {
{
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint

console["warn"](
"The ReactIs.isConcurrentMode() alias has been deprecated, " +
"and will be removed in React 18+."
);
}
}

return false;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
Expand Down Expand Up @@ -223,8 +192,6 @@ if (__DEV__) {
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.SuspenseList = SuspenseList;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
Expand Down
6 changes: 0 additions & 6 deletions compiled/facebook-www/ReactIs-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ exports.Profiler = REACT_PROFILER_TYPE;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
exports.isAsyncMode = function () {
return !1;
};
exports.isConcurrentMode = function () {
return !1;
};
exports.isContextConsumer = function (object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
};
Expand Down
6 changes: 0 additions & 6 deletions compiled/facebook-www/ReactIs-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ exports.Profiler = REACT_PROFILER_TYPE;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
exports.isAsyncMode = function () {
return !1;
};
exports.isConcurrentMode = function () {
return !1;
};
exports.isContextConsumer = function (object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
};
Expand Down

0 comments on commit 9adade5

Please sign in to comment.