You can use bindto pass a specific argument to the handler method.
For instance:
render: function() {
return _.map(list, function(item) {
return <li onClick={this.clickItem.bind(this, item)}>{item.name}</li>;
});
},
clickItem: function(item, event) {
}
If you don’t need to enter an argument, you don’t need to bind, since the reaction always calls the handler method in the component area - although this will change soon
source
share