From 00905ab8f75b1f601ec9faa9dcd98c3347f4d0b6 Mon Sep 17 00:00:00 2001 From: Josh Justice Date: Mon, 7 Jan 2019 15:23:50 -0800 Subject: [PATCH] Fix rerender count on RNTester blue tab (#22876) Summary: In the RNTester TabBarIOS screen, the content of the blue tab suggested it should be displaying a count for the number of rerenders, but it was not: ![before](https://user-images.githubusercontent.com/15832198/50725270-d122e100-10c0-11e9-88a2-1030f6dc3b9a.jpg) This PR adds the count onto the blue tab: ![after](https://user-images.githubusercontent.com/15832198/50725275-dbdd7600-10c0-11e9-9f8f-0835fe1ea054.jpg) The other two tabs already had the counter working correctly. Changelog: ---------- [General] [Fixed] - Fix rerender count on RNTester blue tab Pull Request resolved: https://github.com/facebook/react-native/pull/22876 Differential Revision: D13593262 Pulled By: PeteTheHeat fbshipit-source-id: b45a9fcaed0f217054baa0d28fd3a2ff9a846b08 --- RNTester/js/TabBarIOSExample.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RNTester/js/TabBarIOSExample.js b/RNTester/js/TabBarIOSExample.js index ea03982d06e..83a9c70487d 100644 --- a/RNTester/js/TabBarIOSExample.js +++ b/RNTester/js/TabBarIOSExample.js @@ -56,9 +56,10 @@ class TabBarExample extends React.Component { onPress={() => { this.setState({ selectedTab: 'blueTab', + notifCount: this.state.notifCount + 1, }); }}> - {this._renderContent('#414A8C', 'Blue Tab')} + {this._renderContent('#414A8C', 'Blue Tab', this.state.notifCount)}