Remove deprecated methods from react-is (#28224)
These aren't being used anywhere and don't even correspond to real APIs.
dan committed
Feb 11, 2024 at 00:25 UTC
35b2c28178bf4f79898d11dce0bc2a7ce675f670
3 files changed
-34
packages/react-is/index.experimental.js
-2
@@ -24,8 +24,6 @@ export {
24
StrictMode,
25
Suspense,
26
SuspenseList,
27
- isAsyncMode,
28
- isConcurrentMode,
27
isContextConsumer,
28
isContextProvider,
29
isElement,
packages/react-is/index.stable.js
-2
@@ -24,8 +24,6 @@ export {
24
StrictMode,
25
Suspense,
26
SuspenseList,
27
- isAsyncMode,
28
- isConcurrentMode,
27
isContextConsumer,
28
isContextProvider,
29
isElement,
packages/react-is/src/ReactIs.js
-30
@@ -76,36 +76,6 @@ export const SuspenseList = REACT_SUSPENSE_LIST_TYPE;
76
77
export {isValidElementType};
78
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
-}
79
export function isContextConsumer(object: any): boolean {
80
return typeOf(object) === REACT_CONTEXT_TYPE;
81
}