title: Best way to update className based on react component state
body: <p>What is the best way to update a Classname field based on the state of a react component?</p>
  
  <p>I have a variable called <code>inverted</code> in the state of my react component and want to update the classname of a number of my <code>divs</code> based on whether it is <code>true</code> or <code>false</code>. </p>
  
  <p>What is the best way to go about this? Should I have a separate method to update the classnames? And if so, how do I deal with the asynchronicity of the setState method? If I should update it within the div, what is the best way to do this?</p>