mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 17:45:59 +00:00
11833714d9
Summary: MountItem is a small granular light-weight instruction describing a change in the component view tree. All instruction are supposed to be small and standard. All additional logic must be implemented in component view subclasses. No more opaque and untyped objcblocks. All that allows mounting manager to control and optimize an execution of those items (eventually). Besides that five we probably will need `perform imperative instruction` (for execution something like `scrollTo`) and `update local data` (for updating local state of something like text input). Reviewed By: mdvacca Differential Revision: D7507518 fbshipit-source-id: 745b93125231a02cbc152cfa6c6baf423d100f81
34 lines
703 B
Plaintext
34 lines
703 B
Plaintext
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import "RCTCreateMountItem.h"
|
|
|
|
#import "RCTComponentViewRegistry.h"
|
|
|
|
@implementation RCTCreateMountItem {
|
|
NSString *_componentName;
|
|
ReactTag _tag;
|
|
}
|
|
|
|
- (instancetype)initWithComponentName:(NSString *)componentName
|
|
tag:(ReactTag)tag
|
|
{
|
|
if (self = [super init]) {
|
|
_componentName = componentName;
|
|
_tag = tag;
|
|
}
|
|
|
|
return self;
|
|
}
|
|
|
|
- (void)executeWithRegistry:(RCTComponentViewRegistry *)registry
|
|
{
|
|
[registry dequeueComponentViewWithName:_componentName tag:_tag];
|
|
}
|
|
|
|
@end
|