title: Ternary in jsx to add selected attribute to option
body: <p>I am using the following code to add selected to an option:</p>
  
  <pre><code> &lt;select name="hourSelect" ref="hourSelect"&gt;
             {hourSelect.map((option) =&gt; (
                    &lt;option value={option.value} {(selectedHour == option.value) ? 'selected' : ''}&gt;{option.label} &lt;/option&gt;
              ))}
          &lt;/select&gt;
  </code></pre>
  
  <p>I getting the syntax error:
  Syntax error: C:/sites/CalendarRedux/src/components/modals/AddAchievementModal.js: Unexpected token, expected ... (94:52)</p>
  
  <pre><code>  92 |             &lt;select name="hourSelect" ref="hourSelect"&gt;
    93 |                {hourSelect.map((option) =&gt; (
  &gt; 94 |                       &lt;option value={option.value} {(selectedHour == option.value) ? 'selected' : ''}&gt;{option.label} &lt;/option&gt;
       |                                                     ^
    95 |                 ))}
    96 |             &lt;/select&gt;
  </code></pre>