Skip to content

Commit

Permalink
Update 'cannot calculate shadow efficiently' log message (#39700)
Browse files Browse the repository at this point in the history
Summary:
While working in an app I kept getting these `View X of type Y has a shadow set but cannot calculate shadow efficiently. Consider setting a background color to fix this` warnings even though I had added a background color to that view. Upon inspecting RCTView.m I notice that what is actually required to fix this is a solid background

To make this a bit clearer to developers I believe we should update this log message to explicitly say "solid background" instead of "background"

## Changelog:

[IOS] [CHANGED] - Update 'cannot calculate shadow efficiently' log message to explicitly say solid background

Pull Request resolved: #39700

Test Plan: N / A

Reviewed By: christophpurrer

Differential Revision: D51584574

Pulled By: javache

fbshipit-source-id: b1741f7002ebb876e4a50959bef7f39df76a5c3c
  • Loading branch information
gabrieldonadel authored and facebook-github-bot committed Nov 28, 2023
1 parent 9078db7 commit 94c7661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-native/React/Views/RCTView.m
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ static void RCTUpdateShadowPathForView(RCTView *view)

RCTLogAdvice(
@"View #%@ of type %@ has a shadow set but cannot calculate "
"shadow efficiently. Consider setting a background color to "
"shadow efficiently. Consider setting a solid background color to "
"fix this, or apply the shadow to a more specific component.",
view.reactTag,
[view class]);
Expand Down

0 comments on commit 94c7661

Please sign in to comment.