Skip to content

Commit c5cc145

Browse files
committed
ReactTransitionGroup example: fix typo and logic bug in handleRemove
1 parent 0d2d336 commit c5cc145

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/09-addons.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ var TodoList = React.createClass({
3333
},
3434
handleRemove: function(i) {
3535
var newItems = this.state.items;
36-
newItems.splice(i, 0)
36+
newItems.splice(i, 1)
3737
this.setState({items: newItems});
3838
},
3939
render: function() {
4040
var items = this.state.items.map(function(item, i) {
4141
return (
4242
<div key={i} onClick={this.handleRemove.bind(this, i)}>
43-
{item}}
43+
{item}
4444
</div>
4545
);
4646
}.bind(this));

0 commit comments

Comments
 (0)