From 03751997e3a63d8b9659cf6779c1dec71a3e6969 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Wed, 12 Jun 2019 21:13:46 -0700 Subject: [PATCH] Fabric: Proper background color setting for RCTViewComponentView Summary: Setting value directly to ivar makes impossible to subclasses to react of this; this is a bug. Reviewed By: mdvacca Differential Revision: D15776691 fbshipit-source-id: 10f9be975ee673b2db46c24ba41b18f6d6ddf0a3 --- .../Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index 4efa6a3437..c90da10711 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -120,7 +120,7 @@ using namespace facebook::react; // `backgroundColor` if (oldViewProps.backgroundColor != newViewProps.backgroundColor) { - _backgroundColor = RCTUIColorFromSharedColor(newViewProps.backgroundColor); + self.backgroundColor = RCTUIColorFromSharedColor(newViewProps.backgroundColor); needsInvalidateLayer = YES; }