title: ReactJs this.setState is not a function
body: <p>I'm trying to change the value of a <code>this.state.id</code> with an <code>&lt;input&gt;</code> tag value, when I click on a <code>&lt;a&gt;</code> tag as follows:</p>
  
  <pre><code> {this.state.json[1].map(i =&gt; (
      &lt;tr&gt;
          &lt;td&gt;{i.cin}&lt;/td&gt;
          &lt;td&gt;{i.nom}&lt;/td&gt;
          &lt;td&gt;{i.prenom}&lt;/td&gt;
          &lt;td&gt;
               &lt;a onClick={() =&gt; this.state.click(i.id)} &gt;
                     &lt;input value={i.id} hidden&gt;&lt;/input&gt;
                     Create a New Folder
               &lt;/a&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
    ))}
  </code></pre>
  
  <p>but the console says <code>this.setState is not a function</code>. This is my component: </p>
  
  <pre><code>    constructor(props)
  {
      super(props);
      this.state = {
        json:JSON.parse(props.data),//data received from a laravel controller used to 
        implement the page.
        objet: '',
        id: '',
        click: function(id){
            var a = id;//a is an integer 
            alert('hitting waypoint 1');//clear hit
            this.setState({//error
            id: a,
            }).bind(this);
            alert('hitting waypoint 2');//not alerting
            alert("id = " + this.state.id)//not alerting
        }
      };
      this.onChangeValue = this.onChangeValue.bind(this);
      this.onSubmitButton = this.onSubmitButton.bind(this);     
  }
  </code></pre>