title: onClick is getting called in the rendering itself of image tag?
body: <p>I have a series of image tags, which have <code>onClick</code> on them. In the <code>onClick</code>, I am calling a function called camera, with parameters 
  for imagetag1, 2 for imagetag2 and 3 for imagetag3
  In the camera, I am checking the parameter and doing setState. <strong>But while rendering itself onClick is getting called!</strong> I don't understand this phenomena. <code>Is there is any other way that I should send the id to onClick function</code>?.<br> Here is my code</p>
  
  <pre><code>camera: function(id){
  
    console.log(id);
      var that = this;
        navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
          destinationType: Camera.DestinationType.DATA_URL
        });
  
        function onSuccess(imageData) {
  
            var finalimage = "data:image/jpeg;base64," + imageData;
  
            var temp;
            if(that.id === 1){
              temp ="image1";
            }else if(that.id ===2){
              temp = "image2";
            }else if(that.id === 3){
               temp = "image3"; 
            }
  
            that.setState({temp:finalimage});
  
        }
  
  
       function onFail(message) {
          alert('Failed because: ' + message);
       }
  
  
   },
  
  render: function(){
  return(
        &lt;div&gt;
        &lt;img  className="addpicture" onClick={this.camera(1)} src={this.state.image1} /&gt;
        &lt;img  className="addpicture" onClick={this.camera(2)} src={this.state.image2} /&gt;
        &lt;img  className="addpicture" onClick={this.camera(3)} src={this.state.image3} /&gt;
        &lt;/div&gt;
        ); 
     }
  </code></pre>