Skip to content

Commit 1b613de

Browse files
author
Brian Vaughn
committed
Update exports and feature flags for concurrent mode APIs
1 parent b8fda6c commit 1b613de

12 files changed

+175
-194
lines changed

packages/react-devtools-shell/src/app/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import {createElement} from 'react';
66
import {
77
// $FlowFixMe Flow does not yet know about createRoot()
8-
unstable_createRoot as createRoot,
8+
createRoot,
99
} from 'react-dom';
1010
import DeeplyNestedComponents from './DeeplyNestedComponents';
1111
import Iframe from './Iframe';

packages/react-dom/index.classic.fb.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ Object.assign((__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: any), {
1919
});
2020

2121
export {
22-
createPortal,
23-
unstable_batchedUpdates,
24-
flushSync,
2522
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
26-
version,
23+
createPortal,
24+
createRoot,
25+
createRoot as unstable_createRoot,
2726
findDOMNode,
27+
flushSync,
2828
hydrate,
2929
render,
3030
unmountComponentAtNode,
31-
createRoot,
32-
createRoot as unstable_createRoot,
33-
unstable_flushControlled,
34-
unstable_scheduleHydration,
35-
unstable_runWithPriority,
36-
unstable_renderSubtreeIntoContainer,
37-
unstable_createPortal,
31+
unstable_batchedUpdates,
3832
unstable_createEventHandle,
33+
unstable_createPortal, // Temporary alias
34+
unstable_flushControlled,
3935
unstable_isNewReconciler,
36+
unstable_renderSubtreeIntoContainer,
37+
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
38+
unstable_scheduleHydration,
39+
version,
4040
} from './src/client/ReactDOM';

packages/react-dom/index.experimental.js

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,19 @@
88
*/
99

1010
export {
11-
createPortal,
12-
unstable_batchedUpdates,
13-
flushSync,
1411
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
15-
version,
16-
// Disabled behind disableLegacyReactDOMAPIs
12+
createPortal,
13+
createRoot as unstable_createRoot,
1714
findDOMNode,
15+
flushSync,
1816
hydrate,
1917
render,
2018
unmountComponentAtNode,
21-
// exposeConcurrentModeAPIs
22-
createRoot as unstable_createRoot,
19+
unstable_batchedUpdates,
20+
unstable_createPortal, // Temporary alias
2321
unstable_flushControlled,
24-
unstable_scheduleHydration,
25-
// DO NOT USE: Temporarily exposing this to migrate off of Scheduler.runWithPriority.
26-
unstable_runWithPriority,
27-
// Disabled behind disableUnstableRenderSubtreeIntoContainer
2822
unstable_renderSubtreeIntoContainer,
29-
// Disabled behind disableUnstableCreatePortal
30-
// Temporary alias since we already shipped React 16 RC with it.
31-
// TODO: remove in React 18.
32-
unstable_createPortal,
23+
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
24+
unstable_scheduleHydration,
25+
version,
3326
} from './src/client/ReactDOM';

packages/react-dom/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@
1010
// Export all exports so that they're available in tests.
1111
// We can't use export * from in Flow for some reason.
1212
export {
13-
createPortal,
14-
unstable_batchedUpdates,
15-
flushSync,
1613
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
17-
version,
14+
createPortal,
15+
createRoot,
16+
createRoot as unstable_createRoot,
1817
findDOMNode,
18+
flushSync,
1919
hydrate,
2020
render,
2121
unmountComponentAtNode,
22-
createRoot,
23-
createRoot as unstable_createRoot,
24-
unstable_flushControlled,
25-
unstable_scheduleHydration,
26-
unstable_runWithPriority,
27-
unstable_renderSubtreeIntoContainer,
28-
unstable_createPortal,
22+
unstable_batchedUpdates,
2923
unstable_createEventHandle,
24+
unstable_createPortal, // Temporary alias
25+
unstable_flushControlled,
3026
unstable_isNewReconciler,
27+
unstable_renderSubtreeIntoContainer,
28+
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
29+
unstable_scheduleHydration,
30+
version,
3131
} from './src/client/ReactDOM';

packages/react-dom/index.modern.fb.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
*/
99

1010
export {
11-
createPortal,
12-
unstable_batchedUpdates,
13-
flushSync,
1411
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
15-
version,
12+
createPortal,
1613
createRoot,
1714
createRoot as unstable_createRoot,
18-
unstable_flushControlled,
19-
unstable_scheduleHydration,
20-
unstable_runWithPriority,
15+
flushSync,
16+
unstable_batchedUpdates,
2117
unstable_createEventHandle,
18+
unstable_flushControlled,
2219
unstable_isNewReconciler,
20+
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
21+
unstable_scheduleHydration,
22+
version,
2323
} from './src/client/ReactDOM';

packages/react-dom/index.stable.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@
88
*/
99

1010
export {
11-
createPortal,
12-
unstable_batchedUpdates,
13-
flushSync,
1411
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
15-
version,
12+
createPortal,
1613
findDOMNode,
14+
flushSync,
1715
hydrate,
1816
render,
1917
unmountComponentAtNode,
18+
unstable_batchedUpdates,
19+
unstable_createPortal, // Temporary alias
2020
unstable_renderSubtreeIntoContainer,
21-
// Temporary alias since we already shipped React 16 RC with it.
22-
// TODO: remove in React 18.
23-
unstable_createPortal,
21+
version,
2422
} from './src/client/ReactDOM';

packages/react/index.classic.fb.js

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,52 @@
88
*/
99

1010
export {
11+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
1112
Children,
12-
createRef,
1313
Component,
14+
Fragment,
15+
Profiler,
1416
PureComponent,
17+
StrictMode,
18+
Suspense,
19+
SuspenseList,
20+
SuspenseList as unstable_SuspenseList,
21+
cloneElement,
1522
createContext,
23+
createElement,
24+
createFactory,
25+
createMutableSource,
26+
createMutableSource as unstable_createMutableSource,
27+
createRef,
1628
forwardRef,
29+
isValidElement,
1730
lazy,
1831
memo,
32+
startTransition,
33+
startTransition as unstable_startTransition,
34+
unstable_Cache,
35+
unstable_DebugTracingMode,
36+
unstable_LegacyHidden,
37+
unstable_Scope,
38+
unstable_getCacheForType,
39+
unstable_useCacheRefresh,
40+
unstable_useOpaqueIdentifier,
1941
useCallback,
2042
useContext,
43+
useDebugValue,
44+
useDeferredValue,
45+
useDeferredValue as unstable_useDeferredValue,
2146
useEffect,
2247
useImperativeHandle,
23-
useDebugValue,
2448
useLayoutEffect,
2549
useMemo,
50+
useMutableSource,
51+
useMutableSource as unstable_useMutableSource,
2652
useReducer,
2753
useRef,
2854
useState,
29-
useMutableSource,
30-
useMutableSource as unstable_useMutableSource,
31-
createMutableSource,
32-
createMutableSource as unstable_createMutableSource,
33-
Fragment,
34-
Profiler,
35-
StrictMode,
36-
Suspense,
37-
unstable_LegacyHidden,
38-
createElement,
39-
cloneElement,
40-
isValidElement,
41-
version,
42-
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
43-
createFactory,
44-
// exposeConcurrentModeAPIs
4555
useTransition,
4656
useTransition as unstable_useTransition,
47-
useDeferredValue,
48-
useDeferredValue as unstable_useDeferredValue,
49-
startTransition,
50-
startTransition as unstable_startTransition,
51-
SuspenseList,
52-
SuspenseList as unstable_SuspenseList,
53-
unstable_getCacheForType,
54-
unstable_Cache,
55-
unstable_useCacheRefresh,
56-
// enableScopeAPI
57-
unstable_Scope,
58-
unstable_useOpaqueIdentifier,
59-
// enableDebugTracing
60-
unstable_DebugTracingMode,
57+
version,
6158
} from './src/React';
6259
export {jsx, jsxs, jsxDEV} from './src/jsx/ReactJSX';

packages/react/index.experimental.js

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,44 @@
88
*/
99

1010
export {
11+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
1112
Children,
12-
createRef,
1313
Component,
14+
Fragment,
15+
Profiler,
1416
PureComponent,
17+
StrictMode,
18+
Suspense,
19+
SuspenseList as unstable_SuspenseList,
20+
cloneElement,
1521
createContext,
22+
createElement,
23+
createFactory,
24+
createMutableSource as unstable_createMutableSource,
25+
createRef,
1626
forwardRef,
27+
isValidElement,
1728
lazy,
1829
memo,
30+
startTransition as unstable_startTransition,
31+
unstable_Cache,
32+
unstable_DebugTracingMode,
33+
unstable_LegacyHidden,
34+
unstable_getCacheForType,
35+
unstable_useCacheRefresh,
36+
unstable_useOpaqueIdentifier,
1937
useCallback,
2038
useContext,
39+
useDebugValue,
40+
useDeferredValue as unstable_useDeferredValue,
2141
useEffect,
2242
useImperativeHandle,
23-
useDebugValue,
2443
useLayoutEffect,
2544
useMemo,
45+
useMutableSource as unstable_useMutableSource,
2646
useReducer,
2747
useRef,
2848
useState,
29-
useMutableSource as unstable_useMutableSource,
30-
createMutableSource as unstable_createMutableSource,
31-
Fragment,
32-
Profiler,
33-
StrictMode,
34-
Suspense,
35-
unstable_LegacyHidden,
36-
createElement,
37-
cloneElement,
38-
isValidElement,
39-
version,
40-
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
41-
createFactory,
42-
// exposeConcurrentModeAPIs
4349
useTransition as unstable_useTransition,
44-
useDeferredValue as unstable_useDeferredValue,
45-
startTransition as unstable_startTransition,
46-
SuspenseList as unstable_SuspenseList,
47-
unstable_useOpaqueIdentifier,
48-
unstable_getCacheForType,
49-
unstable_Cache,
50-
unstable_useCacheRefresh,
51-
// enableDebugTracing
52-
unstable_DebugTracingMode,
50+
version,
5351
} from './src/React';

packages/react/index.js

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,51 +32,51 @@ export type ChildrenArray<+T> = $ReadOnlyArray<ChildrenArray<T>> | T;
3232
// Export all exports so that they're available in tests.
3333
// We can't use export * from in Flow for some reason.
3434
export {
35+
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
3536
Children,
36-
createRef,
3737
Component,
38+
Fragment,
39+
Profiler,
3840
PureComponent,
41+
StrictMode,
42+
Suspense,
43+
SuspenseList,
44+
SuspenseList as unstable_SuspenseList,
45+
cloneElement,
3946
createContext,
47+
createElement,
48+
createFactory,
49+
createMutableSource,
50+
createMutableSource as unstable_createMutableSource,
51+
createRef,
4052
forwardRef,
53+
isValidElement,
4154
lazy,
4255
memo,
56+
startTransition,
57+
startTransition as unstable_startTransition,
58+
unstable_Cache,
59+
unstable_DebugTracingMode,
60+
unstable_LegacyHidden,
61+
unstable_Scope,
62+
unstable_getCacheForType,
63+
unstable_useCacheRefresh,
64+
unstable_useOpaqueIdentifier,
4365
useCallback,
4466
useContext,
67+
useDebugValue,
68+
useDeferredValue,
69+
useDeferredValue as unstable_useDeferredValue,
4570
useEffect,
4671
useImperativeHandle,
47-
useDebugValue,
4872
useLayoutEffect,
4973
useMemo,
74+
useMutableSource,
75+
useMutableSource as unstable_useMutableSource,
5076
useReducer,
5177
useRef,
5278
useState,
53-
useMutableSource,
54-
useMutableSource as unstable_useMutableSource,
55-
createMutableSource,
56-
createMutableSource as unstable_createMutableSource,
57-
Fragment,
58-
Profiler,
59-
unstable_DebugTracingMode,
60-
StrictMode,
61-
Suspense,
62-
createElement,
63-
cloneElement,
64-
isValidElement,
65-
version,
66-
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
67-
createFactory,
6879
useTransition,
6980
useTransition as unstable_useTransition,
70-
startTransition,
71-
startTransition as unstable_startTransition,
72-
useDeferredValue,
73-
useDeferredValue as unstable_useDeferredValue,
74-
SuspenseList,
75-
SuspenseList as unstable_SuspenseList,
76-
unstable_LegacyHidden,
77-
unstable_Scope,
78-
unstable_useOpaqueIdentifier,
79-
unstable_getCacheForType,
80-
unstable_Cache,
81-
unstable_useCacheRefresh,
81+
version,
8282
} from './src/React';

0 commit comments

Comments
 (0)