Skip to content

Commit

Permalink
[RCTShadowView localData] is now only setter.
Browse files Browse the repository at this point in the history
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 b0c1bd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion React/Views/RCTShadowView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions React/Views/RCTShadowView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b0c1bd2

Please sign in to comment.