mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/36360 This change is the iOS equivalent of D43731219 (https://github.com/facebook/react-native/commit/ab55e123da8749d982964f2aee6ce6b0bffdc7fc), but only for what concerns the RNTester example as the interop layer was already present in the codebase and exposed to the OSS. ## Changelog [internal] - Add example on how to consume a Legacy component in Fabric with the interop layer Reviewed By: cortinico Differential Revision: D43735699 fbshipit-source-id: 6cb5a3591e7e4a606c274566226025af91849c16
33 lines
688 B
Plaintext
33 lines
688 B
Plaintext
/*
|
|
* 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 <React/RCTLog.h>
|
|
#import <React/RCTUIManager.h>
|
|
#import <React/RCTViewManager.h>
|
|
#import "RNTMyNativeViewComponentView.h"
|
|
|
|
@interface RNTMyLegacyNativeViewManager : RCTViewManager
|
|
|
|
@end
|
|
|
|
@implementation RNTMyLegacyNativeViewManager
|
|
|
|
RCT_EXPORT_MODULE()
|
|
|
|
RCT_REMAP_VIEW_PROPERTY(color, backgroundColor, UIColor)
|
|
|
|
RCT_REMAP_VIEW_PROPERTY(opacity, alpha, CGFloat)
|
|
|
|
- (UIView *)view
|
|
{
|
|
UIView *view = [[UIView alloc] init];
|
|
view.backgroundColor = UIColor.greenColor;
|
|
return view;
|
|
}
|
|
|
|
@end
|