Skip to content

Instantly share code, notes, and snippets.

@jackcallister
Created December 11, 2014 08:41
Show Gist options
  • Save jackcallister/71d5da554b21e2043b67 to your computer and use it in GitHub Desktop.
Save jackcallister/71d5da554b21e2043b67 to your computer and use it in GitHub Desktop.
Transition Group
// 1. Components load for the first time.
// 2. An action causes the node to be removed.
// 1. Element will enter the DOM
componentWillEnter: function(callback) {
callback();
console.log('will enter');
},
// // 1. Element is now in the DOM
componentDidEnter: function() {
console.log('did enter');
},
// // 2. An action has caused this element to be removed from DOM
// // it will now leave.
// // Here is a chance to animate other nodes.
// //
// // Get the next node and animate it into the position
// //
componentWillLeave: function(callback) {
console.log('will leave');
callback();
},
// // 2. The component has now left the DOM
componentDidLeave: function(){
console.log('did leave');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment