mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Changelog: [Internal] Add `RCTNewArchitectureValidationPlaceholder(RCTNotAllowedInAppWideFabric)` to track RCTViewManagers used in Fabric using the legacy interop layer. They work for now in the interop layer, but they need to be migrated to Fabric to remove potential issues with using the legacy architecture and the new architecture simultaneously. RCTNewArchitectureValidationPlaceholder is a no-op used for tracking unmigrated callsites that may be used often. `RCTNewArchitectureValidationPlaceholder(RCTNotAllowedInBridgeless` is to track Bridge APIs that are okay in Fabric but not in Bridgeless. This diff adds the validation placeholder to legacy components registered in [RCTLegacyViewManagerInteropComponentView.mm](https://github.com/facebook/react-native/blob/743d0706e2099514b4603855bfc2b6505fcc10a5/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm#L92-L99). Reviewed By: fkgozali Differential Revision: D37635613 fbshipit-source-id: 5399dad822c8f5c11ef3b32297bf25214fd857dd
37 lines
1.0 KiB
Objective-C
37 lines
1.0 KiB
Objective-C
/*
|
|
* 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.
|
|
*/
|
|
|
|
#import "RCTSegmentedControlManager.h"
|
|
|
|
#import "RCTBridge.h"
|
|
#import "RCTConvert.h"
|
|
#import "RCTSegmentedControl.h"
|
|
|
|
@implementation RCTSegmentedControlManager
|
|
|
|
RCT_EXPORT_MODULE()
|
|
|
|
- (UIView *)view
|
|
{
|
|
RCTNewArchitectureValidationPlaceholder(
|
|
RCTNotAllowedInAppWideFabric,
|
|
self,
|
|
@"This native component is still using the legacy interop layer -- please migrate it to use a Fabric specific implementation.");
|
|
return [RCTSegmentedControl new];
|
|
}
|
|
|
|
RCT_EXPORT_VIEW_PROPERTY(values, NSArray<NSString *>)
|
|
RCT_EXPORT_VIEW_PROPERTY(selectedIndex, NSInteger)
|
|
RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor)
|
|
RCT_EXPORT_VIEW_PROPERTY(backgroundColor, UIColor)
|
|
RCT_EXPORT_VIEW_PROPERTY(textColor, UIColor)
|
|
RCT_EXPORT_VIEW_PROPERTY(momentary, BOOL)
|
|
RCT_EXPORT_VIEW_PROPERTY(enabled, BOOL)
|
|
RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock)
|
|
|
|
@end
|