title: React js onclick toggle class in map function
body: <p>How to handle toggle class onclick function in mapping list dom.</p>
  
  <pre><code>this.state.data.map(function(el,i){
      var className = self.state.condition ? 'list-row active' : 'inactive';
      return &lt;div className={className} key={i} onClick={self.handleClick.bind(self)}&gt;
              &lt;div&gt;List&lt;/div&gt;
          &lt;/div&gt;
      });
  </code></pre>