Skip to content

Commit e3ff3cf

Browse files
sherginfacebook-github-bot
authored andcommitted
Removed outdated assertion in RCTShadowView related to breaking change in Yoga
Summary: It's been more than two years; I think everyone already migrated and learned the new behavior. Reviewed By: emilsjolander Differential Revision: D6829885 fbshipit-source-id: a86d56fb7235a137e9ce6e360d7ae2224b047313
1 parent ed5872e commit e3ff3cf

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

React/Views/RCTShadowView.m

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,6 @@ - (void)applyLayoutNode:(YGNodeRef)node
203203
return;
204204
}
205205

206-
#if RCT_DEBUG
207-
// This works around a breaking change in Yoga layout where setting flexBasis needs to be set explicitly, instead of relying on flex to propagate.
208-
// We check for it by seeing if a width/height is provided along with a flexBasis of 0 and the width/height is laid out as 0.
209-
if (YGNodeStyleGetFlexBasis(node).unit == YGUnitPoint && YGNodeStyleGetFlexBasis(node).value == 0 &&
210-
((YGNodeStyleGetWidth(node).unit == YGUnitPoint && YGNodeStyleGetWidth(node).value > 0 && YGNodeLayoutGetWidth(node) == 0) ||
211-
(YGNodeStyleGetHeight(node).unit == YGUnitPoint && YGNodeStyleGetHeight(node).value > 0 && YGNodeLayoutGetHeight(node) == 0))) {
212-
RCTLogError(@"View was rendered with explicitly set width/height but with a 0 flexBasis. (This might be fixed by changing flex: to flexGrow:) View: %@", self);
213-
}
214-
#endif
215-
216206
CGRect frame = CGRectMake(YGNodeLayoutGetLeft(node), YGNodeLayoutGetTop(node), YGNodeLayoutGetWidth(node), YGNodeLayoutGetHeight(node));
217207

218208
// Even if `YGNodeLayoutGetDirection` can return `YGDirectionInherit` here, it actually means

0 commit comments

Comments
 (0)