Fix warnings of StyleInspector
Summary: Fix issue #5831 Closes https://github.com/facebook/react-native/pull/5832 Reviewed By: svcscm Differential Revision: D2917760 Pulled By: vjeux fb-gh-sync-id: 3808d14075b259dd21056a7111205edae1e3eb48 shipit-source-id: 3808d14075b259dd21056a7111205edae1e3eb48
This commit is contained in:
parent
197880518b
commit
97741af8b9
|
@ -25,13 +25,13 @@ class StyleInspector extends React.Component {
|
|||
return (
|
||||
<View style={styles.container}>
|
||||
<View>
|
||||
{names.map(name => <Text style={styles.attr}>{name}:</Text>)}
|
||||
{names.map(name => <Text key={name} style={styles.attr}>{name}:</Text>)}
|
||||
</View>
|
||||
|
||||
<View>
|
||||
{names.map(name => {
|
||||
var value = typeof this.props.style[name] === 'object' ? JSON.stringify(this.props.style[name]) : this.props.style[name];
|
||||
return <Text style={styles.value}>{value}</Text>;
|
||||
return <Text key={name} style={styles.value}>{value}</Text>;
|
||||
} ) }
|
||||
</View>
|
||||
</View>
|
||||
|
|
Loading…
Reference in New Issue