Created
December 11, 2014 08:41
-
-
Save jackcallister/71d5da554b21e2043b67 to your computer and use it in GitHub Desktop.
Transition Group
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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