From 3b8c3d0961f387ef225f370bdaeacac26c818d3b Mon Sep 17 00:00:00 2001 From: Rajiv Shah Date: Thu, 25 Oct 2018 12:42:24 -0400 Subject: [PATCH 1/2] Fix displayName prop on View and Text components --- Libraries/Components/View/View.js | 1 + Libraries/Text/Text.js | 1 + 2 files changed, 2 insertions(+) diff --git a/Libraries/Components/View/View.js b/Libraries/Components/View/View.js index 46e55feb8be3f8..0c4cca3271eaa0 100644 --- a/Libraries/Components/View/View.js +++ b/Libraries/Components/View/View.js @@ -49,6 +49,7 @@ if (__DEV__) { }; // $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet. ViewToExport = React.forwardRef(View); + ViewToExport.displayName = 'View'; } } diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index 02c4ce284843f5..f1b6c807874f95 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -277,6 +277,7 @@ const Text = ( }; // $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet. const TextToExport = React.forwardRef(Text); +TextToExport.displayName = 'Text'; // TODO: Deprecate this. TextToExport.propTypes = DeprecatedTextPropTypes; From ba1c4b6844e7975f908f4a4ab3daff9d06f6fc09 Mon Sep 17 00:00:00 2001 From: Rajiv Shah Date: Thu, 25 Oct 2018 12:45:40 -0400 Subject: [PATCH 2/2] Update snapshots --- .../YellowBoxCategory-test.js.snap | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Libraries/YellowBox/Data/__tests__/__snapshots__/YellowBoxCategory-test.js.snap b/Libraries/YellowBox/Data/__tests__/__snapshots__/YellowBoxCategory-test.js.snap index ee88875c3717c9..1a527066b06c52 100644 --- a/Libraries/YellowBox/Data/__tests__/__snapshots__/YellowBoxCategory-test.js.snap +++ b/Libraries/YellowBox/Data/__tests__/__snapshots__/YellowBoxCategory-test.js.snap @@ -2,7 +2,7 @@ exports[`YellowBoxCategory renders a single substitution 1`] = ` Array [ - "A" - , + , ] `; exports[`YellowBoxCategory renders content with no substitutions 1`] = ` Array [ - + A - , + , ] `; exports[`YellowBoxCategory renders multiple substitutions 1`] = ` Array [ - "A" - , - + , + - , - , + "B" - , - + , + - , - , + "C" - , + , ] `; exports[`YellowBoxCategory renders substitutions with leading content 1`] = ` Array [ - + ! - , - , + "A" - , + , ] `; exports[`YellowBoxCategory renders substitutions with trailing content 1`] = ` Array [ - "A" - , - + , + ! - , + , ] `;