title: Pass a function that returns a string in className Reactjs
body: <p>I want to pass a function that returns string to set the <code>className</code> of an element by this string in reactjs.</p>
  
  <p>I tried something like this but it didnt return anything:</p>
  
  <p><code>className={() =&gt; shift.spots === 0 ? "notassigned" : "filled"}</code></p>