From e4fe55708972c0b09674e99b4841830339620196 Mon Sep 17 00:00:00 2001 From: Christopher Dro Date: Fri, 11 Dec 2015 21:21:02 -0800 Subject: [PATCH] Fix all warnings for missing keys. Summary: I had to go through each component while debugging for another issue and decided to clean these warnings up along the way. Closes https://github.com/facebook/react-native/pull/4653 Reviewed By: svcscm Differential Revision: D2752740 Pulled By: androidtrunkagent fb-gh-sync-id: 94da8ad693cae04e353f33f540c15214f6f3e7d8 --- Examples/UIExplorer/AnimatedExample.js | 1 + Examples/UIExplorer/AsyncStorageExample.js | 2 +- Examples/UIExplorer/CameraRollExample.ios.js | 4 ++-- .../PullToRefreshViewAndroidExample.android.js | 4 ++-- Examples/UIExplorer/StatusBarIOSExample.js | 6 +++--- Examples/UIExplorer/TextInputExample.ios.js | 2 +- Examples/UIExplorer/TimerExample.js | 15 +++++++++++++-- 7 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Examples/UIExplorer/AnimatedExample.js b/Examples/UIExplorer/AnimatedExample.js index e417cacbe..5f6096338 100644 --- a/Examples/UIExplorer/AnimatedExample.js +++ b/Examples/UIExplorer/AnimatedExample.js @@ -195,6 +195,7 @@ exports.examples = [ {['Composite', 'Easing', 'Animations!'].map( (text, ii) => ( diff --git a/Examples/UIExplorer/AsyncStorageExample.js b/Examples/UIExplorer/AsyncStorageExample.js index a091c0caa..a3ca76437 100644 --- a/Examples/UIExplorer/AsyncStorageExample.js +++ b/Examples/UIExplorer/AsyncStorageExample.js @@ -80,7 +80,7 @@ var BasicStorageExample = React.createClass({ {' '} Messages: - {this.state.messages.map((m) => {m})} + {this.state.messages.map((m) => {m})} ); }, diff --git a/Examples/UIExplorer/CameraRollExample.ios.js b/Examples/UIExplorer/CameraRollExample.ios.js index d783d9d8e..d1f3e96c9 100644 --- a/Examples/UIExplorer/CameraRollExample.ios.js +++ b/Examples/UIExplorer/CameraRollExample.ios.js @@ -79,8 +79,8 @@ var CameraRollExample = React.createClass({ var location = asset.node.location.longitude ? JSON.stringify(asset.node.location) : 'Unknown location'; return ( - - + + { - return ; + const rows = this.state.rowData.map((row, ii) => { + return ; }); return ( {['default', 'light-content'].map((style) => - StatusBarIOS.setStyle(style)}> setStyle('{style}') @@ -49,7 +49,7 @@ exports.examples = [{ return ( {['default', 'light-content'].map((style) => - StatusBarIOS.setStyle(style, true)}> setStyle('{style}', true) @@ -65,7 +65,7 @@ exports.examples = [{ return ( {['none', 'fade', 'slide'].map((animation) => - + StatusBarIOS.setHidden(true, animation)}> diff --git a/Examples/UIExplorer/TextInputExample.ios.js b/Examples/UIExplorer/TextInputExample.ios.js index 9efde2ea0..2479e1d61 100644 --- a/Examples/UIExplorer/TextInputExample.ios.js +++ b/Examples/UIExplorer/TextInputExample.ios.js @@ -158,7 +158,7 @@ class TokenizedTextExample extends React.Component { //highlight hashtags parts = parts.map((text) => { if (/^#/.test(text)) { - return {text}; + return {text}; } else { return text; } diff --git a/Examples/UIExplorer/TimerExample.js b/Examples/UIExplorer/TimerExample.js index 55272a822..51a8f1af5 100644 --- a/Examples/UIExplorer/TimerExample.js +++ b/Examples/UIExplorer/TimerExample.js @@ -171,9 +171,20 @@ exports.examples = [ } return ( - {timer} + {this.state.showTimer && this._renderTimer()} - {toggleText} + {this.state.showTimer ? 'Unmount timer' : 'Mount new timer'} + + + ); + }, + + _renderTimer: function() { + return ( + + + this.refs.interval.clear() }> + Clear interval );