summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9dd0ab6)
And also simplify the code quite a bit, (using a simple join()
function instead of a map with multiple span and literal {" "}
elements.
{state.scores.words.map(word => {
return (
<li key={word.word}>
{state.scores.words.map(word => {
return (
<li key={word.word}>
- {word.word}:
- {word.players.map(p => {
- return (
- <span key={p}>{p}{" "}</span>
- );
- })}
+ {`${word.word}: ${word.players.join(', ')}`}