Fix example for animation
* Highlight the correct lines * Add missing text to button * Remove unnecessary div
Stefan Dombrowski committed
Jun 22, 2014 at 18:11 UTC
c91f95a092051c44bb9e241f7551f47cfdce8e36
1 file changed
+3
-3
docs/docs/09.1-animation.md
+3
-3
@@ -17,7 +17,7 @@ React provides a `ReactTransitionGroup` addon component as a low-level API for a
17
18
`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.
19
20
-```javascript{22-24}
20
+```javascript{30-32}
21
/** @jsx React.DOM */
22
23
var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
@@ -33,7 +33,7 @@ var TodoList = React.createClass({
33
},
34
handleRemove: function(i) {
35
var newItems = this.state.items;
36
- newItems.splice(i, 1)
36
+ newItems.splice(i, 1);
37
this.setState({items: newItems});
38
},
39
render: function() {
@@ -46,7 +46,7 @@ var TodoList = React.createClass({
46
}.bind(this));
47
return (
48
<div>
49
- <div><button onClick={this.handleAdd} /></div>
49
+ <button onClick={this.handleAdd}>Add Item</button>
50
<ReactCSSTransitionGroup transitionName="example">
51
{items}
52
</ReactCSSTransitionGroup>