title: Adding style attributes to a css class dynamically in react app
body: <p>I'm using webpack with css-loader to load my css styles and add them to React components.</p>
  
  <pre><code>import styles from '../styles/cell.css';
  
  .cell {
      border-radius: 50%;
      background-color: white;
  }
  
  &lt;div className={styles.cell} /&gt;
  </code></pre>
  
  <p>I'm calculating the height/width for the cell dynamically. <a href="https://facebook.github.io/react/docs/dom-elements.html" rel="noreferrer">Here</a> they describe how to add styles to components dynamically, but i'd prefer doing this without the style attribute.</p>
  
  <p>I tried doing this in one of the parent components thinking it might alter the css class but that didn't seem to work.</p>
  
  <pre><code>import cell_styles from '../styles/cell.css';
  cell_styles.width = this.cellSize + 'px'
  cell_styles.height = this.cellSize + 'px'
  </code></pre>
  
  <p>Any feedback on how best to do this?</p>