From 7091f1560235c4df1369970e3603f214bf27cdec Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Thu, 19 Jul 2018 19:00:38 -0700 Subject: [PATCH] RN: Move ART Canvas Workaround Summary: Moves the `ReactNativeART` workaround to callers. There are legitimate use cases where you don't want to re-mount this component repeatedly. Reviewed By: fkgozali Differential Revision: D8928633 fbshipit-source-id: 0aafc1136ce9acb290e26a4f1a958819439bf2f0 --- Libraries/ART/ReactNativeART.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Libraries/ART/ReactNativeART.js b/Libraries/ART/ReactNativeART.js index cf56028b1..5a08e748c 100644 --- a/Libraries/ART/ReactNativeART.js +++ b/Libraries/ART/ReactNativeART.js @@ -11,7 +11,6 @@ const Color = require('art/core/color'); const Path = require('ARTSerializablePath'); -const Platform = require('Platform'); const Transform = require('art/core/transform'); const React = require('React'); @@ -154,11 +153,8 @@ class Surface extends React.Component { const height = extractNumber(this.props.height, 0); const width = extractNumber(this.props.width, 0); - // WORKAROUND: Android bug in which canvas does not reflect size changes. - const key = Platform.OS === 'android' ? height + ',' + width : null; - return ( - + {this.props.children} );