mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-12 10:48:06 +08:00
Summary: Apparently, I haven't modify all files in D14018903. Here is the last (I hope) chunk. Reviewed By: JoshuaGross Differential Revision: D14058288 fbshipit-source-id: b21950cdd1aa9aa55b0c72fac0f8b44e4a7d131c
33 lines
684 B
Plaintext
33 lines
684 B
Plaintext
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import "RCTRootComponentView.h"
|
|
|
|
#import <react/components/root/RootProps.h>
|
|
#import <react/components/root/RootShadowNode.h>
|
|
|
|
using namespace facebook::react;
|
|
|
|
@implementation RCTRootComponentView
|
|
|
|
- (instancetype)initWithFrame:(CGRect)frame
|
|
{
|
|
if (self = [super initWithFrame:frame]) {
|
|
static const auto defaultProps = std::make_shared<const RootProps>();
|
|
_props = defaultProps;
|
|
}
|
|
|
|
return self;
|
|
}
|
|
|
|
+ (ComponentHandle)componentHandle
|
|
{
|
|
return RootShadowNode::Handle();
|
|
}
|
|
|
|
@end
|