Browse Source

Update 09.1-animation.md

main
Chris Sciolla 11 years ago
parent
commit
a825a2678d
  1. 4
      docs/09.1-animation.md

4
docs/09.1-animation.md

@ -88,7 +88,7 @@ You'll notice that when you try to remove an item `ReactCSSTransitionGroup` keep
In order for it to apply transitions to its children, the `ReactCSSTransitionGroup` must already be mounted in the DOM. The example below would not work, because the `ReactCSSTransitionGroup` is being mounted along with the new item, instead of the new item being mounted within it. Compare this to the [Getting Started](/docs/docs/09.1-animation.md#getting-started) section above to see the difference. In order for it to apply transitions to its children, the `ReactCSSTransitionGroup` must already be mounted in the DOM. The example below would not work, because the `ReactCSSTransitionGroup` is being mounted along with the new item, instead of the new item being mounted within it. Compare this to the [Getting Started](/docs/docs/09.1-animation.md#getting-started) section above to see the difference.
```javascript{12-14} ```javascript{12-14}
render: function() { render: function() {
var items = this.state.items.map(function(item, i) { var items = this.state.items.map(function(item, i) {
return ( return (
<div key={item} onClick={this.handleRemove.bind(this, i)}> <div key={item} onClick={this.handleRemove.bind(this, i)}>
@ -97,7 +97,7 @@ render: function() {
</ReactCSSTransitionGroup> </ReactCSSTransitionGroup>
</div> </div>
); );
}.bind(this)); }, this);
return ( return (
<div> <div>
<button onClick={this.handleAdd}>Add Item</button> <button onClick={this.handleAdd}>Add Item</button>

Loading…
Cancel
Save