Skip to content

Instantly share code, notes, and snippets.

@alenm
Last active March 25, 2017 22:18
Show Gist options
  • Save alenm/32a3a15644540ddf3dfbb4c41cecd5ac to your computer and use it in GitHub Desktop.
Save alenm/32a3a15644540ddf3dfbb4c41cecd5ac to your computer and use it in GitHub Desktop.
Emberjs Component Lifecycle
// On Intial Render
init() {
this._super(...arguments);
console.log('init');
},
didReceiveAttrs() {
this._super(...arguments);
console.log('didReceiveAttrs');
},
willRender() {
this._super(...arguments);
console.log('willRender');
},
didInsertElement() {
this._super(...arguments);
console.log('didInsertElement');
},
didRender() {
this._super(...arguments);
console.log('didRender');
},
// On Re-Render
didUpdateAttrs() {
this._super(...arguments);
console.log('didUpdateAttrs');
},
didReceiveAttrs() {
this._super(...arguments);
console.log('didReceiveAttrs');
},
willUpdate() {
this._super(...arguments);
console.log('willUpdate');
},
willRender() {
this._super(...arguments);
console.log('willRender');
},
didUpdate() {
this._super(...arguments);
console.log('didUpdate');
},
didRender() {
this._super(...arguments);
console.log('didRender');
},
// On Component Destroy
willDestroyElement() {
this._super(...arguments);
console.log('willDestroyElement');
},
willClearRender() {
this._super(...arguments);
console.log('willClearRender');
},
didDestroyElement() {
this._super(...arguments);
console.log('didDestroyElement');
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment