Click handlers can only be added to DOM-based components; if you want to add them to a composite component, you must pass them to the DOM component, as such:
this.state.items.map(function(item, i) {
return (
<Todo description={item} key={item} onClick={this.handleRemove.bind(this, i)}/>);
}.bind(this));
// ...
var Todo = React.createClass({
render: function() {
return (
<tr onClick={this.props.onClick}>
<td>{this.props.description}</td>
</tr>
);
}
});
jsbin click fireler, , CSS ( ReactCSSTransitionGroup):
.example-leave {
opacity: 1;
transition: opacity .5s ease-in;
}
.example-leave.example-leave-active {
opacity: 0.01;
}
, , span span:
<table>
<ReactCSSTransitionGroup transitionName="example" component="tbody">
{items}
</ReactCSSTransitionGroup>
</table>
jsbin : http://jsbin.com/dakenabehi/3/edit?css,js,console,output