mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
Fabric: Basic implementation of <View nativeId={...}>
Summary: Trivial. `nativeId` is meant to be used by subclasses of external inspector-like tools, so it does not have any real functionality. Reviewed By: fkgozali Differential Revision: D8344064 fbshipit-source-id: d86ef378cda1f7f0e9a7b4ffc09f51004ae530d2
This commit is contained in:
parent
da55ef1367
commit
cde30eb6b7
@ -36,6 +36,15 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
*/
|
*/
|
||||||
@property (nonatomic, strong, nullable) UIView *contentView;
|
@property (nonatomic, strong, nullable) UIView *contentView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides access to `nativeId` prop of the component.
|
||||||
|
* It might be used by subclasses (which need to refer to the view from
|
||||||
|
* other platform-specific external views or systems by some id) or
|
||||||
|
* by debugging/inspection tools.
|
||||||
|
* Defaults to `nil`.
|
||||||
|
*/
|
||||||
|
@property (nonatomic, strong, nullable) NSString *nativeId;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@ -53,6 +53,11 @@ using namespace facebook::react;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Implement all sutable non-layout <View> props.
|
// TODO: Implement all sutable non-layout <View> props.
|
||||||
|
// `nativeId`
|
||||||
|
if (oldViewProps.nativeId != newViewProps.nativeId) {
|
||||||
|
self.nativeId = [NSString stringWithCString:newViewProps.nativeId.c_str()
|
||||||
|
encoding:NSASCIIStringEncoding];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)updateEventEmitter:(SharedEventEmitter)eventEmitter
|
- (void)updateEventEmitter:(SharedEventEmitter)eventEmitter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user