Script
Script2y ago

✅ – 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>
);
})}
4 Replies
Louis
Louis2y ago
An implicit return versus an explicit return. Functionally equivalent. https://blog.louisyoung.co.uk/implicit-explicit-returns-javascript/
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
reactibot
reactibot2y ago
This question has an answer! Thank you for helping 😄 If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1053248803253268511
reactibot
reactibot2y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1053248803253268511 Question not getting answered? Maybe it's hard to answer, or maybe you asked at a slow time. Check out these resources for help asking a good question: https://stackoverflow.com/help/how-to-ask http://wp.me/p2oIwo-26