React & HTML: Highlight a table cell with booleans

I’m using React, and was wondering wether it is possible to highlight a table cell with a boolean, kind of this here:

 <table>
  <tr>
    <td {if (highlight)  bgColor = 'red'} >Emil</td>
    <td>Tobias</td>
    <td>Linus</td>
  </tr>
</table> 

(Where highlight is a boolean state variable).

Answer

Yes, you can. Simply use a ternary operator for that:

<td style={{backgroundColor: highlight ? 'red' : ''}} >Emil</td>