title: React: Using arrow function to pass a prop
body: <p>In one of my component I am using something like:</p>
  
  <pre><code>&lt;PhotoList update_photo={() =&gt; this.update_photo()} /&gt;
  </code></pre>
  
  <p>Here I am passing a function as a props which updates a photo to the state..</p>
  
  <p>and In my photo list component I have list of photos where I am updating the photo like:</p>
  
  <pre><code>&lt;div className="single-photo" onClick={() =&gt; this.props.update_photo(photo)}&gt;
  </code></pre>
  
  <p>Here it is passing <code>undefined</code> instead of photo.. buth when I use it in general way like <code>&lt;PhotoList update_photo={this.update_photo.bind(this)} /&gt;</code> and <code>&lt;div className="single-photo" onClick={this.props.update_photo.bind(this, photo)}&gt;</code> it works</p>
  
  <p>What is the difference and why is the first method not working ??</p>