diff --git a/packages/react-native/Libraries/ReactNative/AppContainer-dev.js b/packages/react-native/Libraries/ReactNative/AppContainer-dev.js index 7eee9c75f8e7..db3e0868daa7 100644 --- a/packages/react-native/Libraries/ReactNative/AppContainer-dev.js +++ b/packages/react-native/Libraries/ReactNative/AppContainer-dev.js @@ -100,7 +100,6 @@ const ReactDevToolsOverlayDeferred = ({ const AppContainer = ({ children, - fabric, initialProps, internal_excludeInspector = false, internal_excludeLogBox = false, @@ -165,7 +164,7 @@ const AppContainer = ({ if (WrapperComponent != null) { innerView = ( - + {innerView} ); diff --git a/packages/react-native/Libraries/ReactNative/AppContainer-prod.js b/packages/react-native/Libraries/ReactNative/AppContainer-prod.js index 5f8de6fe7839..bd3ea7c4ab9b 100644 --- a/packages/react-native/Libraries/ReactNative/AppContainer-prod.js +++ b/packages/react-native/Libraries/ReactNative/AppContainer-prod.js @@ -17,7 +17,6 @@ import * as React from 'react'; const AppContainer = ({ children, - fabric, initialProps, rootTag, WrapperComponent, @@ -27,7 +26,7 @@ const AppContainer = ({ if (WrapperComponent != null) { innerView = ( - + {innerView} ); diff --git a/packages/react-native/Libraries/ReactNative/AppContainer.js b/packages/react-native/Libraries/ReactNative/AppContainer.js index 58bc7319e44c..a9e6fff6541e 100644 --- a/packages/react-native/Libraries/ReactNative/AppContainer.js +++ b/packages/react-native/Libraries/ReactNative/AppContainer.js @@ -15,7 +15,6 @@ import * as React from 'react'; export type Props = Readonly<{ children?: React.Node, - fabric?: boolean, rootTag: number | RootTag, initialProps?: {...}, WrapperComponent?: ?React.ComponentType, diff --git a/packages/react-native/Libraries/ReactNative/AppRegistry.flow.js b/packages/react-native/Libraries/ReactNative/AppRegistry.flow.js index ce51f1380c9f..948ef3b5c859 100644 --- a/packages/react-native/Libraries/ReactNative/AppRegistry.flow.js +++ b/packages/react-native/Libraries/ReactNative/AppRegistry.flow.js @@ -31,7 +31,6 @@ export type AppConfig = { export type AppParameters = { initialProps: Readonly<{[string]: unknown, ...}>, rootTag: RootTag, - fabric?: boolean, }; export type Runnable = ( appParameters: AppParameters, diff --git a/packages/react-native/Libraries/ReactNative/AppRegistryImpl.js b/packages/react-native/Libraries/ReactNative/AppRegistryImpl.js index c37640b1b5dc..e6bd106713d6 100644 --- a/packages/react-native/Libraries/ReactNative/AppRegistryImpl.js +++ b/packages/react-native/Libraries/ReactNative/AppRegistryImpl.js @@ -94,7 +94,7 @@ export function registerComponent( appParameters.rootTag, wrapperComponentProvider && wrapperComponentProvider(appParameters), rootViewStyleProvider && rootViewStyleProvider(appParameters), - appParameters.fabric, + true, // fabric - deprecated, always true scopedPerformanceLogger, appKey === 'LogBox', // is logbox appKey, diff --git a/packages/react-native/Libraries/ReactNative/renderApplication.js b/packages/react-native/Libraries/ReactNative/renderApplication.js index 875e3fef4be0..1dd4e52e1cc1 100644 --- a/packages/react-native/Libraries/ReactNative/renderApplication.js +++ b/packages/react-native/Libraries/ReactNative/renderApplication.js @@ -13,7 +13,6 @@ import type {IPerformanceLogger} from '../Utilities/createPerformanceLogger'; import GlobalPerformanceLogger from '../Utilities/GlobalPerformanceLogger'; import PerformanceLoggerContext from '../Utilities/PerformanceLoggerContext'; -import warnOnce from '../Utilities/warnOnce'; import AppContainer from './AppContainer'; import DisplayMode, {type DisplayModeType} from './DisplayMode'; import getCachedComponentWithDebugName from './getCachedComponentWithDebugName'; @@ -37,7 +36,9 @@ export default function renderApplication( rootTag: any, WrapperComponent?: ?React.ComponentType, rootViewStyle?: ?ViewStyleProp, - fabric?: boolean, + // Keep this parameter for backwards compatibility only. It is always treated as + // true internally. + fabric?: true | void, scopedPerformanceLogger?: IPerformanceLogger, isLogBox?: boolean, debugName?: string, @@ -52,7 +53,6 @@ export default function renderApplication( ( ); } - // We want to have concurrentRoot always enabled when you're on Fabric. - const useConcurrentRoot = Boolean(fabric); - performanceLogger.startTimespan('renderApplication_React_render'); - performanceLogger.setExtra( - 'usedReactConcurrentRoot', - useConcurrentRoot ? '1' : '0', - ); - performanceLogger.setExtra('usedReactFabric', fabric ? '1' : '0'); + performanceLogger.setExtra('usedReactConcurrentRoot', '1'); + performanceLogger.setExtra('usedReactFabric', '1'); performanceLogger.setExtra( 'usedReactProfiler', Renderer.isProfilingRenderer(), @@ -103,16 +97,8 @@ export default function renderApplication( Renderer.renderElement({ element: renderable, rootTag, - useFabric: Boolean(fabric), - useConcurrentRoot, + useFabric: true, + useConcurrentRoot: true, }); - - const newArchitecture = !!fabric; - if (!newArchitecture) { - warnOnce( - '[OSS][OldArchDeprecatedWarning]', - 'The app is running using the Legacy Architecture. The Legacy Architecture is deprecated and will be removed in a future version of React Native. Please consider migrating to the New Architecture. For more information, please see https://reactnative.dev/blog/2024/10/23/the-new-architecture-is-here', - ); - } performanceLogger.stopTimespan('renderApplication_React_render'); } diff --git a/packages/react-native/ReactNativeApi.d.ts b/packages/react-native/ReactNativeApi.d.ts index fdd39000be66..9d852f4d2f62 100644 --- a/packages/react-native/ReactNativeApi.d.ts +++ b/packages/react-native/ReactNativeApi.d.ts @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> * * This file was generated by scripts/js-api/build-types/index.js. */ @@ -1638,7 +1638,6 @@ declare type AppearancePreferences = { colorScheme?: ColorSchemeName } declare type AppParameters = { - fabric?: boolean initialProps: { readonly [$$Key$$: string]: unknown } @@ -6013,8 +6012,8 @@ export { AlertType, // 5ab91217 AndroidKeyboardEvent, // e03becc8 Animated, // a77a3944 - AppConfig, // ebddad4b - AppRegistry, // f7a253e4 + AppConfig, // ce4209a7 + AppRegistry, // 5edf0524 AppState, // 12012be5 AppStateEvent, // 80f034c3 AppStateStatus, // 447e5ef2 @@ -6183,15 +6182,15 @@ export { RefreshControlProps, // e747ed5d RefreshControlPropsAndroid, // 99f64c97 RefreshControlPropsIOS, // 72a36381 - Registry, // e1ed403e + Registry, // 6c39216d ResponderSyntheticEvent, // fb10247c ReturnKeyTypeOptions, // afd47ba3 Role, // af7b889d RootTag, // 3cd10504 RootTagContext, // 38bfc8f6 RootViewStyleProvider, // d4818465 - Runnable, // 2cb32c54 - Runnables, // d3749ae1 + Runnable, // 594dd93a + Runnables, // 4367c557 SafeAreaView, // 9589fa67 ScaledSize, // 07e417c7 ScrollEvent, // 5d529218