Browse Source

Fix animation example code

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

Fixes #853
main
Paul O’Shannessy 11 years ago
parent
commit
f58a507cb7
  1. 2
      docs/09.1-animation.md

2
docs/09.1-animation.md

@ -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…
Cancel
Save