Skip to content

Instantly share code, notes, and snippets.

@privatenumber
Created January 18, 2019 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save privatenumber/10f3b840769bc2d17dad8d1cb344eb9c to your computer and use it in GitHub Desktop.
Save privatenumber/10f3b840769bc2d17dad8d1cb344eb9c to your computer and use it in GitHub Desktop.
Vue lifecycle tap
window.VueLifecycleTap = ['beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUpdate', 'updated', 'beforeDestroy', 'destroyed'].reduce((agg, curr) => {
agg[curr] = function() {
console.log(`uid: ${this._uid} -`, curr);
};
return agg;
}, {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment