title: react change class name on state change
body: <p>I have a state like this where I am setting <code>active</code> and <code>class</code> flag like this:</p>
  
  <pre><code>constructor(props) {
    super(props);
    this.state = {'active': false, 'class': 'album'};
  }
  
  handleClick(id) {
    if(this.state.active){
      this.setState({'active': false,'class': 'album'})
    }else{
      this.setState({'active': true,'class': 'active'})
    }
  }
  </code></pre>
  
  <p>And I have a list of items with class name from state:</p>
  
  <pre><code>&lt;div className={this.state.class} key={data.id} onClick={this.handleClick.bind(this.data.id}&gt;
    &lt;p&gt;{data.name}&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here how can I change the class name of particular div?</p>