Skip to content

Commit

Permalink
Update exports and feature flags for concurrent mode APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed May 12, 2021
1 parent b8fda6c commit 1b613de
Show file tree
Hide file tree
Showing 12 changed files with 175 additions and 194 deletions.
2 changes: 1 addition & 1 deletion packages/react-devtools-shell/src/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import {createElement} from 'react';
import {
// $FlowFixMe Flow does not yet know about createRoot()
unstable_createRoot as createRoot,
createRoot,
} from 'react-dom';
import DeeplyNestedComponents from './DeeplyNestedComponents';
import Iframe from './Iframe';
Expand Down
22 changes: 11 additions & 11 deletions packages/react-dom/index.classic.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ Object.assign((__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: any), {
});

export {
createPortal,
unstable_batchedUpdates,
flushSync,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
version,
createPortal,
createRoot,
createRoot as unstable_createRoot,
findDOMNode,
flushSync,
hydrate,
render,
unmountComponentAtNode,
createRoot,
createRoot as unstable_createRoot,
unstable_flushControlled,
unstable_scheduleHydration,
unstable_runWithPriority,
unstable_renderSubtreeIntoContainer,
unstable_createPortal,
unstable_batchedUpdates,
unstable_createEventHandle,
unstable_createPortal, // Temporary alias
unstable_flushControlled,
unstable_isNewReconciler,
unstable_renderSubtreeIntoContainer,
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
unstable_scheduleHydration,
version,
} from './src/client/ReactDOM';
23 changes: 8 additions & 15 deletions packages/react-dom/index.experimental.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,19 @@
*/

export {
createPortal,
unstable_batchedUpdates,
flushSync,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
version,
// Disabled behind disableLegacyReactDOMAPIs
createPortal,
createRoot as unstable_createRoot,
findDOMNode,
flushSync,
hydrate,
render,
unmountComponentAtNode,
// exposeConcurrentModeAPIs
createRoot as unstable_createRoot,
unstable_batchedUpdates,
unstable_createPortal, // Temporary alias
unstable_flushControlled,
unstable_scheduleHydration,
// DO NOT USE: Temporarily exposing this to migrate off of Scheduler.runWithPriority.
unstable_runWithPriority,
// Disabled behind disableUnstableRenderSubtreeIntoContainer
unstable_renderSubtreeIntoContainer,
// Disabled behind disableUnstableCreatePortal
// Temporary alias since we already shipped React 16 RC with it.
// TODO: remove in React 18.
unstable_createPortal,
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
unstable_scheduleHydration,
version,
} from './src/client/ReactDOM';
22 changes: 11 additions & 11 deletions packages/react-dom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
// Export all exports so that they're available in tests.
// We can't use export * from in Flow for some reason.
export {
createPortal,
unstable_batchedUpdates,
flushSync,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
version,
createPortal,
createRoot,
createRoot as unstable_createRoot,
findDOMNode,
flushSync,
hydrate,
render,
unmountComponentAtNode,
createRoot,
createRoot as unstable_createRoot,
unstable_flushControlled,
unstable_scheduleHydration,
unstable_runWithPriority,
unstable_renderSubtreeIntoContainer,
unstable_createPortal,
unstable_batchedUpdates,
unstable_createEventHandle,
unstable_createPortal, // Temporary alias
unstable_flushControlled,
unstable_isNewReconciler,
unstable_renderSubtreeIntoContainer,
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
unstable_scheduleHydration,
version,
} from './src/client/ReactDOM';
14 changes: 7 additions & 7 deletions packages/react-dom/index.modern.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
*/

export {
createPortal,
unstable_batchedUpdates,
flushSync,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
version,
createPortal,
createRoot,
createRoot as unstable_createRoot,
unstable_flushControlled,
unstable_scheduleHydration,
unstable_runWithPriority,
flushSync,
unstable_batchedUpdates,
unstable_createEventHandle,
unstable_flushControlled,
unstable_isNewReconciler,
unstable_runWithPriority, // DO NOT USE: Temporarily exposed to migrate off of Scheduler.runWithPriority.
unstable_scheduleHydration,
version,
} from './src/client/ReactDOM';
12 changes: 5 additions & 7 deletions packages/react-dom/index.stable.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@
*/

export {
createPortal,
unstable_batchedUpdates,
flushSync,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
version,
createPortal,
findDOMNode,
flushSync,
hydrate,
render,
unmountComponentAtNode,
unstable_batchedUpdates,
unstable_createPortal, // Temporary alias
unstable_renderSubtreeIntoContainer,
// Temporary alias since we already shipped React 16 RC with it.
// TODO: remove in React 18.
unstable_createPortal,
version,
} from './src/client/ReactDOM';
61 changes: 29 additions & 32 deletions packages/react/index.classic.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,52 @@
*/

export {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
Children,
createRef,
Component,
Fragment,
Profiler,
PureComponent,
StrictMode,
Suspense,
SuspenseList,
SuspenseList as unstable_SuspenseList,
cloneElement,
createContext,
createElement,
createFactory,
createMutableSource,
createMutableSource as unstable_createMutableSource,
createRef,
forwardRef,
isValidElement,
lazy,
memo,
startTransition,
startTransition as unstable_startTransition,
unstable_Cache,
unstable_DebugTracingMode,
unstable_LegacyHidden,
unstable_Scope,
unstable_getCacheForType,
unstable_useCacheRefresh,
unstable_useOpaqueIdentifier,
useCallback,
useContext,
useDebugValue,
useDeferredValue,
useDeferredValue as unstable_useDeferredValue,
useEffect,
useImperativeHandle,
useDebugValue,
useLayoutEffect,
useMemo,
useMutableSource,
useMutableSource as unstable_useMutableSource,
useReducer,
useRef,
useState,
useMutableSource,
useMutableSource as unstable_useMutableSource,
createMutableSource,
createMutableSource as unstable_createMutableSource,
Fragment,
Profiler,
StrictMode,
Suspense,
unstable_LegacyHidden,
createElement,
cloneElement,
isValidElement,
version,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
createFactory,
// exposeConcurrentModeAPIs
useTransition,
useTransition as unstable_useTransition,
useDeferredValue,
useDeferredValue as unstable_useDeferredValue,
startTransition,
startTransition as unstable_startTransition,
SuspenseList,
SuspenseList as unstable_SuspenseList,
unstable_getCacheForType,
unstable_Cache,
unstable_useCacheRefresh,
// enableScopeAPI
unstable_Scope,
unstable_useOpaqueIdentifier,
// enableDebugTracing
unstable_DebugTracingMode,
version,
} from './src/React';
export {jsx, jsxs, jsxDEV} from './src/jsx/ReactJSX';
48 changes: 23 additions & 25 deletions packages/react/index.experimental.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,44 @@
*/

export {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
Children,
createRef,
Component,
Fragment,
Profiler,
PureComponent,
StrictMode,
Suspense,
SuspenseList as unstable_SuspenseList,
cloneElement,
createContext,
createElement,
createFactory,
createMutableSource as unstable_createMutableSource,
createRef,
forwardRef,
isValidElement,
lazy,
memo,
startTransition as unstable_startTransition,
unstable_Cache,
unstable_DebugTracingMode,
unstable_LegacyHidden,
unstable_getCacheForType,
unstable_useCacheRefresh,
unstable_useOpaqueIdentifier,
useCallback,
useContext,
useDebugValue,
useDeferredValue as unstable_useDeferredValue,
useEffect,
useImperativeHandle,
useDebugValue,
useLayoutEffect,
useMemo,
useMutableSource as unstable_useMutableSource,
useReducer,
useRef,
useState,
useMutableSource as unstable_useMutableSource,
createMutableSource as unstable_createMutableSource,
Fragment,
Profiler,
StrictMode,
Suspense,
unstable_LegacyHidden,
createElement,
cloneElement,
isValidElement,
version,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
createFactory,
// exposeConcurrentModeAPIs
useTransition as unstable_useTransition,
useDeferredValue as unstable_useDeferredValue,
startTransition as unstable_startTransition,
SuspenseList as unstable_SuspenseList,
unstable_useOpaqueIdentifier,
unstable_getCacheForType,
unstable_Cache,
unstable_useCacheRefresh,
// enableDebugTracing
unstable_DebugTracingMode,
version,
} from './src/React';
58 changes: 29 additions & 29 deletions packages/react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,51 +32,51 @@ export type ChildrenArray<+T> = $ReadOnlyArray<ChildrenArray<T>> | T;
// Export all exports so that they're available in tests.
// We can't use export * from in Flow for some reason.
export {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
Children,
createRef,
Component,
Fragment,
Profiler,
PureComponent,
StrictMode,
Suspense,
SuspenseList,
SuspenseList as unstable_SuspenseList,
cloneElement,
createContext,
createElement,
createFactory,
createMutableSource,
createMutableSource as unstable_createMutableSource,
createRef,
forwardRef,
isValidElement,
lazy,
memo,
startTransition,
startTransition as unstable_startTransition,
unstable_Cache,
unstable_DebugTracingMode,
unstable_LegacyHidden,
unstable_Scope,
unstable_getCacheForType,
unstable_useCacheRefresh,
unstable_useOpaqueIdentifier,
useCallback,
useContext,
useDebugValue,
useDeferredValue,
useDeferredValue as unstable_useDeferredValue,
useEffect,
useImperativeHandle,
useDebugValue,
useLayoutEffect,
useMemo,
useMutableSource,
useMutableSource as unstable_useMutableSource,
useReducer,
useRef,
useState,
useMutableSource,
useMutableSource as unstable_useMutableSource,
createMutableSource,
createMutableSource as unstable_createMutableSource,
Fragment,
Profiler,
unstable_DebugTracingMode,
StrictMode,
Suspense,
createElement,
cloneElement,
isValidElement,
version,
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
createFactory,
useTransition,
useTransition as unstable_useTransition,
startTransition,
startTransition as unstable_startTransition,
useDeferredValue,
useDeferredValue as unstable_useDeferredValue,
SuspenseList,
SuspenseList as unstable_SuspenseList,
unstable_LegacyHidden,
unstable_Scope,
unstable_useOpaqueIdentifier,
unstable_getCacheForType,
unstable_Cache,
unstable_useCacheRefresh,
version,
} from './src/React';
Loading

0 comments on commit 1b613de

Please sign in to comment.