diff --git a/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js b/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js index 4c542bddfac..71210f989d7 100644 --- a/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +++ b/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js @@ -4,22 +4,20 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @flow strict-local * @format + * @flow strict-local */ -import {type HostComponent} from '../../Renderer/shims/ReactNativeTypes'; -import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry'; -import {type ViewProps as Props} from '../View/ViewPropTypes'; +import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; +import type {ViewProps} from '../View/ViewPropTypes'; -const AndroidHorizontalScrollContentViewNativeComponent: HostComponent = NativeComponentRegistry.get( +type NativeProps = $ReadOnly<{| + ...ViewProps, +|}>; + +type NativeType = HostComponent; + +export default (codegenNativeComponent( 'AndroidHorizontalScrollContentView', - () => ({ - uiViewClassName: 'AndroidHorizontalScrollContentView', - bubblingEventTypes: {}, - directEventTypes: {}, - validAttributes: {}, - }), -); - -export default AndroidHorizontalScrollContentViewNativeComponent; +): NativeType); diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/CoreComponentsRegistry.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/CoreComponentsRegistry.cpp index 560b8eaaa70..cd13e075b17 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/CoreComponentsRegistry.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/CoreComponentsRegistry.cpp @@ -64,6 +64,9 @@ CoreComponentsRegistry::sharedProviderRegistry() { concreteComponentDescriptorProvider()); providerRegistry->add( concreteComponentDescriptorProvider()); + providerRegistry->add( + concreteComponentDescriptorProvider< + AndroidHorizontalScrollContentViewComponentDescriptor>()); providerRegistry->add( concreteComponentDescriptorProvider()); providerRegistry->add(concreteComponentDescriptorProvider< diff --git a/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp b/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp index cb149393dde..27cb851b102 100644 --- a/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +++ b/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp @@ -68,7 +68,7 @@ static std::string componentNameByReactViewName(std::string viewName) { } // TODO T63839307: remove this condition after deleting TextInlineImage from - // Paper + // non-Fabric code if (viewName == "TextInlineImage") { return "Image"; } @@ -94,9 +94,8 @@ static std::string componentNameByReactViewName(std::string viewName) { // We need this temporarily for testing purposes until we have proper // implementation of core components. - if (viewName == "ScrollContentView" || - viewName == "AndroidHorizontalScrollContentView" // Android - ) { + // iOS-only + if (viewName == "ScrollContentView") { return "View"; }