Skip to content

Commit

Permalink
Fix animation example code
Browse files Browse the repository at this point in the history
key should never be index into an array or there are bugs. Especially in
transitions.

Fixes #853
  • Loading branch information
zpao authored and vjeux committed Feb 2, 2014
1 parent 6e4ddfd commit dd66223
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/09.1-animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);
Expand Down

0 comments on commit dd66223

Please sign in to comment.