Skip to content

Commit fd4143a

Browse files
waldreiterzpao
authored andcommitted
Fix example for animation
* Highlight the correct lines * Add missing text to button * Remove unnecessary div (cherry picked from commit c91f95a)
1 parent 224b6e5 commit fd4143a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/docs/09.1-animation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ React provides a `ReactTransitionGroup` addon component as a low-level API for a
1717

1818
`ReactCSSTransitionGroup` is the interface to `ReactTransitions`. This is a simple element that wraps all of the components you are interested in animating. Here's an example where we fade list items in and out.
1919

20-
```javascript{22-24}
20+
```javascript{30-32}
2121
/** @jsx React.DOM */
2222
2323
var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
@@ -33,7 +33,7 @@ var TodoList = React.createClass({
3333
},
3434
handleRemove: function(i) {
3535
var newItems = this.state.items;
36-
newItems.splice(i, 1)
36+
newItems.splice(i, 1);
3737
this.setState({items: newItems});
3838
},
3939
render: function() {
@@ -46,7 +46,7 @@ var TodoList = React.createClass({
4646
}.bind(this));
4747
return (
4848
<div>
49-
<div><button onClick={this.handleAdd} /></div>
49+
<button onClick={this.handleAdd}>Add Item</button>
5050
<ReactCSSTransitionGroup transitionName="example">
5151
{items}
5252
</ReactCSSTransitionGroup>

0 commit comments

Comments
 (0)