Skip to content

Commit 35b2c28

Browse files
authored
Remove deprecated methods from react-is (#28224)
These aren't being used anywhere and don't even correspond to real APIs.
1 parent 06e410e commit 35b2c28

File tree

3 files changed

+0
-34
lines changed

3 files changed

+0
-34
lines changed

packages/react-is/index.experimental.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ export {
2424
StrictMode,
2525
Suspense,
2626
SuspenseList,
27-
isAsyncMode,
28-
isConcurrentMode,
2927
isContextConsumer,
3028
isContextProvider,
3129
isElement,

packages/react-is/index.stable.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ export {
2424
StrictMode,
2525
Suspense,
2626
SuspenseList,
27-
isAsyncMode,
28-
isConcurrentMode,
2927
isContextConsumer,
3028
isContextProvider,
3129
isElement,

packages/react-is/src/ReactIs.js

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -76,36 +76,6 @@ export const SuspenseList = REACT_SUSPENSE_LIST_TYPE;
7676

7777
export {isValidElementType};
7878

79-
let hasWarnedAboutDeprecatedIsAsyncMode = false;
80-
let hasWarnedAboutDeprecatedIsConcurrentMode = false;
81-
82-
// AsyncMode should be deprecated
83-
export function isAsyncMode(object: any): boolean {
84-
if (__DEV__) {
85-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
86-
hasWarnedAboutDeprecatedIsAsyncMode = true;
87-
// Using console['warn'] to evade Babel and ESLint
88-
console['warn'](
89-
'The ReactIs.isAsyncMode() alias has been deprecated, ' +
90-
'and will be removed in React 18+.',
91-
);
92-
}
93-
}
94-
return false;
95-
}
96-
export function isConcurrentMode(object: any): boolean {
97-
if (__DEV__) {
98-
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
99-
hasWarnedAboutDeprecatedIsConcurrentMode = true;
100-
// Using console['warn'] to evade Babel and ESLint
101-
console['warn'](
102-
'The ReactIs.isConcurrentMode() alias has been deprecated, ' +
103-
'and will be removed in React 18+.',
104-
);
105-
}
106-
}
107-
return false;
108-
}
10979
export function isContextConsumer(object: any): boolean {
11080
return typeOf(object) === REACT_CONTEXT_TYPE;
11181
}

0 commit comments

Comments
 (0)