facebook/react — pull request #508 by pgherveou (2013-11-11 03:17:04+00:00)
Title: add componentDidEnter hook on transitiongroup items

this pr add a hook on a component that is called once the enter animation has ended
this is useful when you want to trigger some operation just after the entrance animation

this is what it look like in practise

```js
var ReactTransitionGroup = React.addons.TransitionGroup;

var TodoItem = React.createClass({
render: function () {
return this.transferPropsTo(

{this.props.item}

));
},

componentDidMount: function() {
console.log('I just mounted', this.props.item, new Date);
},

componentDidEnter: function() {
console.log('I just entered', this.props.item, new Date);
}

})

var TodoList = React.createClass({
getInitialState: function() {
return {items: ['hello', 'world', 'click', 'me']};
},
handleAdd: function() {
var newItems =
this.state.items.concat([prompt('Enter some text')]);
this.setState({items: newItems});
},
handleRemove: function(i) {
var newItems = this.state.items;
newItems.splice(i, 1)
this.setState({items: newItems});
},
render: function() {
var items = this.state.items.map(function(item, i) {
return
}.bind(this));
return (

Add

{items}

);
}
});
```