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:
parent
46c6ac5bb0
commit
d8e9eb978b
|
|
@ -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>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue