Skip to content

Commit b0c1bd2

Browse files
sherginfacebook-github-bot
authored andcommitted
[RCTShadowView localData] is now only setter.
Summary: It saves 8 bytes per shadowView instance, and it is more logical because it does nothing by default. Reviewed By: javache Differential Revision: D5997804 fbshipit-source-id: c985a11aeea881e95911469e10c8c27429a2718a
1 parent 9e220da commit b0c1bd2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

React/Views/RCTShadowView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry
6868
* Use `-[RCTUIManager setLocalData:forView:]` to set this property
6969
* (to provide local/environmental data for a shadow view) from the main thread.
7070
*/
71-
@property (nonatomic, strong) NSObject *localData;
71+
- (void)setLocalData:(NSObject *)localData;
7272

7373
/**
7474
* isNewView - Used to track the first time the view is introduced into the hierarchy. It is initialized YES, then is

React/Views/RCTShadowView.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,13 @@ - (void)setIntrinsicContentSize:(CGSize)intrinsicContentSize
681681
YGNodeMarkDirty(_yogaNode);
682682
}
683683

684+
// Local Data
685+
686+
- (void)setLocalData:(__unused NSObject *)localData
687+
{
688+
// Do nothing by default.
689+
}
690+
684691
// Flex
685692

686693
- (void)setFlexBasis:(YGValue)value

0 commit comments

Comments
 (0)