diff --git a/packages/react-native/Libraries/Components/LayoutConformance/LayoutConformance.js b/packages/react-native/Libraries/Components/LayoutConformance/LayoutConformance.js index 027428146a06..154c624b4855 100644 --- a/packages/react-native/Libraries/Components/LayoutConformance/LayoutConformance.js +++ b/packages/react-native/Libraries/Components/LayoutConformance/LayoutConformance.js @@ -18,41 +18,15 @@ export type LayoutConformanceProps = Readonly<{ * compatibility: Layout with the same behavior as previous versions of React Native */ mode: 'strict' | 'compatibility', - children: React.Node, }>; -// We want a graceful fallback for apps using legacy arch, but need to know -// ahead of time whether the component is available, so we test for global. -// This does not correctly handle mixed arch apps (which is okay, since we just -// degrade the error experience). -const isFabricUIManagerInstalled = global?.nativeFabricUIManager != null; - -function LayoutConformance(props: LayoutConformanceProps): React.Node { +export default component LayoutConformance(...props: LayoutConformanceProps) { return ( ); } -function UnimplementedLayoutConformance( - props: LayoutConformanceProps, -): React.Node { - if (__DEV__) { - const warnOnce = require('../../Utilities/warnOnce').default; - - warnOnce( - 'layoutconformance-unsupported', - '"LayoutConformance" is only supported in the New Architecture', - ); - } - - return props.children; -} - -export default (isFabricUIManagerInstalled - ? LayoutConformance - : UnimplementedLayoutConformance) as component(...LayoutConformanceProps); - const styles = StyleSheet.create({ container: { display: 'contents',