Fix animation example code

key should never be index into an array or there are bugs. Especially in
transitions.

Fixes #853
This commit is contained in:
Paul O’Shannessy
2014-01-29 13:06:22 -08:00
parent 46c6ac5bb0
commit d8e9eb978b

View File

@@ -35,7 +35,7 @@ var TodoList = React.createClass({
render: function() {
var items = this.state.items.map(function(item, i) {
return (
<div key={i} onClick={this.handleRemove.bind(this, i)}>
<div key={item} onClick={this.handleRemove.bind(this, i)}>
{item}
</div>
);