✅ – Script – 09-54 Dec 16

What's the explanation for the difference between this two?
{people.map((data) => (
<View key={data.key}>
<Text style={styles.item}>{data.name}</Text>
</View>
))}
{people.map((data) => (
<View key={data.key}>
<Text style={styles.item}>{data.name}</Text>
</View>
))}
{people.map((data) => {
return (
<View key={data.key}>
<Text style={styles.item}>{data.name}</Text>
</View>
);
})}
{people.map((data) => {
return (
<View key={data.key}>
<Text style={styles.item}>{data.name}</Text>
</View>
);
})}
L
Louis489d ago
An implicit return versus an explicit return. Functionally equivalent. https://blog.louisyoung.co.uk/implicit-explicit-returns-javascript/
UU
Unknown User488d ago