From b88769d0c80c8402e2f33d75ba99f3183d2f2af6 Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Wed, 8 May 2024 13:03:23 -0400 Subject: [PATCH] Facebook: merge react index.classic.fb and index.modern.fb These export the same. NOTE: The 2 builds are still different based on flags and other forked files. --- .../{index.classic.fb.js => index.fb.js} | 28 ++++---- packages/react/index.modern.fb.js | 66 ------------------- 2 files changed, 14 insertions(+), 80 deletions(-) rename packages/react/{index.classic.fb.js => index.fb.js} (100%) delete mode 100644 packages/react/index.modern.fb.js diff --git a/packages/react/index.classic.fb.js b/packages/react/index.fb.js similarity index 100% rename from packages/react/index.classic.fb.js rename to packages/react/index.fb.js index c1bfe5b0e4713..49259d9eaf50f 100644 --- a/packages/react/index.classic.fb.js +++ b/packages/react/index.fb.js @@ -10,42 +10,43 @@ export { __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, act, + cache, Children, - Component, - Fragment, - Profiler, - PureComponent, - StrictMode, - Suspense, cloneElement, + Component, createContext, createElement, createRef, - use, + experimental_useEffectEvent, forwardRef, + Fragment, isValidElement, lazy, memo, - cache, + Profiler, + PureComponent, startTransition, + StrictMode, + Suspense, unstable_Activity, - unstable_TracingMarker, unstable_DebugTracingMode, + unstable_getCacheForType, unstable_LegacyHidden, unstable_Scope, unstable_SuspenseList, - unstable_getCacheForType, + unstable_TracingMarker, unstable_useCacheRefresh, - useId, + use, + useActionState, useCallback, useContext, useDebugValue, useDeferredValue, useEffect, - experimental_useEffectEvent, + useId, useImperativeHandle, - useLayoutEffect, useInsertionEffect, + useLayoutEffect, useMemo, useOptimistic, useReducer, @@ -53,7 +54,6 @@ export { useState, useSyncExternalStore, useTransition, - useActionState, version, } from './src/ReactClient'; diff --git a/packages/react/index.modern.fb.js b/packages/react/index.modern.fb.js deleted file mode 100644 index d5fa4463762d7..0000000000000 --- a/packages/react/index.modern.fb.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow - */ - -export { - __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, - act, - Children, - Component, - Fragment, - Profiler, - PureComponent, - StrictMode, - Suspense, - cloneElement, - createContext, - createElement, - createRef, - use, - forwardRef, - isValidElement, - lazy, - memo, - cache, - startTransition, - unstable_DebugTracingMode, - unstable_LegacyHidden, - unstable_Activity, - unstable_Scope, - unstable_SuspenseList, - unstable_TracingMarker, - unstable_getCacheForType, - unstable_useCacheRefresh, - useId, - useCallback, - useContext, - useDebugValue, - useDeferredValue, - useEffect, - experimental_useEffectEvent, - useImperativeHandle, - useInsertionEffect, - useLayoutEffect, - useMemo, - useOptimistic, - useSyncExternalStore, - useReducer, - useRef, - useState, - useTransition, - useActionState, - version, -} from './src/ReactClient'; -export {jsx, jsxs, jsxDEV} from './src/jsx/ReactJSX'; - -// export for backwards compatibility during upgrade -export {useMemoCache as unstable_useMemoCache} from './src/ReactHooks'; - -// export to match the name of the OSS function typically exported from -// react/compiler-runtime -export {useMemoCache as c} from './src/ReactHooks';