]> git.cworth.org Git - lmno.games/commitdiff
Stop abusing the JavaScript back-tick syntax within JSX
authorCarl Worth <cworth@cworth.org>
Sun, 28 Jun 2020 00:34:06 +0000 (17:34 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 28 Jun 2020 00:34:06 +0000 (17:34 -0700)
JSX already lets us implicitly combine adjacent string literals
together so it's simpler to not use the JavaScript back-tick syntax
but instead simply pop back to JSX when we need some literal string
content.

empathy/empathy.jsx

index 85738f3eb69a021a7e4cf3bc67fb728f0473b546..044d4e07ad5e3e62885648410f0d6977d5b62525 100644 (file)
@@ -1077,7 +1077,7 @@ class Game extends React.PureComponent {
             {state.scores.words.map(word => {
               return (
                 <li key={word.word}>
             {state.scores.words.map(word => {
               return (
                 <li key={word.word}>
-                  {`${word.word}: ${word.players.join(', ')}`}
+                  {word.word}: {word.players.join(', ')}
                 </li>
               );
             })}
                 </li>
               );
             })}