From 94c76612062c548782cb9b033398467cb8a079e4 Mon Sep 17 00:00:00 2001 From: Gabriel Donadel Date: Tue, 28 Nov 2023 03:24:25 -0800 Subject: [PATCH] Update 'cannot calculate shadow efficiently' log message (#39700) 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: https://github.com/facebook/react-native/pull/39700 Test Plan: N / A Reviewed By: christophpurrer Differential Revision: D51584574 Pulled By: javache fbshipit-source-id: b1741f7002ebb876e4a50959bef7f39df76a5c3c --- packages/react-native/React/Views/RCTView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/Views/RCTView.m b/packages/react-native/React/Views/RCTView.m index bb8336615a0208..6e6f9cd2761035 100644 --- a/packages/react-native/React/Views/RCTView.m +++ b/packages/react-native/React/Views/RCTView.m @@ -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]);