mirror of
https://github.com/facebook/react.git
synced 2026-02-26 18:58:05 +00:00
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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user