title: ReactJS Cannot read property 'bind' of undefined
body: <p>I am trying to learn reactjs by making some simple apps. I thought I had figured the basics out, until I stumbled upon a situation where I use .bind. I am trying to make a small list that, when clicked, will remove the clicked list-item. The logic behind it is not implemented yet as I keep running into the same error. I have looked through other questions, but for some reason I haven't managed to make it work, so if this is reposted I am sorry.</p>
  
  <pre><code>"Cannot read property 'bind' of undefined"
  </code></pre>
  
  <p>The code in question is implemented below. I would really appreciate some help on this. I know it's a really basic problem, but hey. Can't always be perfect. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var React = require("react");
  var ReactDOM = require("react-dom");
  
  var dataList = ["Apples","Bananas", "Oranges", "Pinapple"];
  
  var Wrapper = React.createClass({
   handleClick: function(item, event) {
    console.log("clicked");
   },
   render: function() {
    var allData = this.props.datalist;
    return(
     &lt;div&gt;
      &lt;ul&gt;
       {allData.map(function(listpoint,i) {
        return(
         &lt;li onClick={this.handleClick.bind(this,listpoint)} key={"list" + i}&gt;{listpoint} [{i}]&lt;/li&gt;
        );
       })}
      &lt;/ul&gt;
     &lt;/div&gt;
    );
   }
  });
  
  ReactDOM.render(
   &lt;Wrapper datalist={dataList}/&gt;,
   document.getElementById("container")
  );</code></pre>
  </div>
  </div>
  </p>