Browse Source

ReactTransitionGroup example: fix typo and logic bug in handleRemove

main
Brian Rue 11 years ago
parent
commit
2226476039
  1. 4
      docs/09-addons.md

4
docs/09-addons.md

@ -33,14 +33,14 @@ var TodoList = React.createClass({
},
handleRemove: function(i) {
var newItems = this.state.items;
newItems.splice(i, 0)
newItems.splice(i, 1)
this.setState({items: newItems});
},
render: function() {
var items = this.state.items.map(function(item, i) {
return (
<div key={i} onClick={this.handleRemove.bind(this, i)}>
{item}}
{item}
</div>
);
}.bind(this));

Loading…
Cancel
Save