Permalink
Browse files

`[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
  • Loading branch information...
shergin authored and facebook-github-bot committed Oct 9, 2017
1 parent 9e220da commit b0c1bd284fa7c62eee64f4e14bf082c0e03bb764
Showing with 8 additions and 1 deletion.
  1. +1 −1 React/Views/RCTShadowView.h
  2. +7 −0 React/Views/RCTShadowView.m
@@ -68,7 +68,7 @@ typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry
* Use `-[RCTUIManager setLocalData:forView:]` to set this property
* (to provide local/environmental data for a shadow view) from the main thread.
*/
@property (nonatomic, strong) NSObject *localData;
- (void)setLocalData:(NSObject *)localData;
/**
* isNewView - Used to track the first time the view is introduced into the hierarchy. It is initialized YES, then is
@@ -681,6 +681,13 @@ - (void)setIntrinsicContentSize:(CGSize)intrinsicContentSize
YGNodeMarkDirty(_yogaNode);
}
// Local Data
- (void)setLocalData:(__unused NSObject *)localData
{
// Do nothing by default.
}
// Flex
- (void)setFlexBasis:(YGValue)value

0 comments on commit b0c1bd2

Please sign in to comment.