Posted By

heathbo on 12/08/16


javascript React

Versions (?)

React: ES6 Pass value to method from onClick

 / Published in: JavaScript

Using new ES6 syntax, how to pass a parameter into a method from an onClick method found in the render method.

  1. return (
  2. <th value={column} onClick={() => this.handleSort(column)}>{column}</th>
  3. );

Report this snippet  

You need to login to post a comment.