diff --git a/packages/react-native/React/Views/RCTComponentData.h b/packages/react-native/React/Views/RCTComponentData.h index e5c22a19c474..5f6ce2e8e2c5 100644 --- a/packages/react-native/React/Views/RCTComponentData.h +++ b/packages/react-native/React/Views/RCTComponentData.h @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +#ifndef RCT_REMOVE_LEGACY_COMPONENT_INTEROP + #import #import @@ -48,3 +50,5 @@ NS_ASSUME_NONNULL_BEGIN RCT_EXTERN NSString *RCTViewManagerModuleNameForClass(Class managerClass); NS_ASSUME_NONNULL_END + +#endif // RCT_REMOVE_LEGACY_COMPONENT_INTEROP diff --git a/packages/react-native/React/Views/RCTComponentData.mm b/packages/react-native/React/Views/RCTComponentData.mm index c857b4021478..70425ad70366 100644 --- a/packages/react-native/React/Views/RCTComponentData.mm +++ b/packages/react-native/React/Views/RCTComponentData.mm @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +#ifndef RCT_REMOVE_LEGACY_COMPONENT_INTEROP + #import "RCTComponentData.h" #import @@ -550,3 +552,5 @@ - (void)setProps:(NSDictionary *)props forView:(id } @end + +#endif // RCT_REMOVE_LEGACY_COMPONENT_INTEROP diff --git a/packages/react-native/React/Views/RCTViewManager.h b/packages/react-native/React/Views/RCTViewManager.h index ed17a436d861..014d30d888d3 100644 --- a/packages/react-native/React/Views/RCTViewManager.h +++ b/packages/react-native/React/Views/RCTViewManager.h @@ -21,6 +21,8 @@ typedef void (^RCTViewManagerUIBlock)(RCTUIManager *uiManager, NSDictionary *viewRegistry); +#ifndef RCT_REMOVE_LEGACY_COMPONENT_INTEROP + @interface RCTViewManager : NSObject /** @@ -119,3 +121,5 @@ typedef void (^RCTViewManagerUIBlock)(RCTUIManager *uiManager, NSDictionary