@@ -33,6 +33,7 @@ import {
33
33
cloneElementWithValidation ,
34
34
} from './ReactElementValidator' ;
35
35
import ReactSharedInternals from './ReactSharedInternals' ;
36
+ import { enableStableConcurrentModeAPIs } from 'shared/ReactFeatureFlags' ;
36
37
37
38
const React = {
38
39
Children : {
@@ -54,9 +55,7 @@ const React = {
54
55
55
56
Fragment : REACT_FRAGMENT_TYPE ,
56
57
StrictMode : REACT_STRICT_MODE_TYPE ,
57
- unstable_ConcurrentMode : REACT_CONCURRENT_MODE_TYPE ,
58
58
Suspense : REACT_SUSPENSE_TYPE ,
59
- unstable_Profiler : REACT_PROFILER_TYPE ,
60
59
61
60
createElement : __DEV__ ? createElementWithValidation : createElement ,
62
61
cloneElement : __DEV__ ? cloneElementWithValidation : cloneElement ,
@@ -68,4 +67,12 @@ const React = {
68
67
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED : ReactSharedInternals ,
69
68
} ;
70
69
70
+ if ( enableStableConcurrentModeAPIs ) {
71
+ React . ConcurrentMode = REACT_CONCURRENT_MODE_TYPE ;
72
+ React . Profiler = REACT_PROFILER_TYPE ;
73
+ } else {
74
+ React . unstable_ConcurrentMode = REACT_CONCURRENT_MODE_TYPE ;
75
+ React . unstable_Profiler = REACT_PROFILER_TYPE ;
76
+ }
77
+
71
78
export default React ;
0 commit comments