title: React.js: How to use the same button while passing variables to a click function
body: <p>I am using material-ui as a UI framework and I am trying to create a view with two buttons that have different values. </p>
  
  <pre class="lang-js prettyprint-override"><code>  render: function() {
  
      return 
        &lt;Card&gt;
          &lt;CardMedia overlay={&lt;CardTitle title={this.props.title} /&gt;}&gt;
            &lt;img src={this.props.image}/&gt;
          &lt;/CardMedia&gt;
          &lt;CardActions&gt;
            &lt;FlatButton onClick={this._handleClick} label="Good"/&gt;
            &lt;FlatButton onClick={this._handleClick} label="Bad"/&gt;
          &lt;/CardActions&gt;
        &lt;/Card&gt;
  </code></pre>
  
  
  
  <p>Since I am new to react I think that I miss something basic. How can I pass values to FlatButton, can I use the "ref" attribute? My main problem is that I am using a framework. If I had written those components I would just use props, such as "label" and handle the click event from the component itself.</p>
  
  <p><strong>Update:</strong> found a solution, but still if feels like an anti-pattern...</p>
  
  <pre><code>      &lt;FlatButton onClick={this._handleClick.bind(this, 1)} label="Good"/&gt;
        &lt;FlatButton onClick={this._handleClick.bind(this, 0)} label="Bad"/&gt;
  </code></pre>
  
  <p>Appreciate the help... </p>