Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue js hooks


beforeUpdate(){
///beforeUpdate: Called when data changes, before the DOM is patched
}

mounted() {
  this.$nextTick(function () {
    // Code that will run only after the
    // entire view has been rendered
  })
}

updated() {
  this.$nextTick(function () {
    // Code that will run only after the
    // entire view has been re-rendered
  })
}
//others are
//beforeUpdate : Called when data changes, before the DOM is patched. 
//activated : Called when a kept-alive component is activated.
// deactivated : Called when a kept-alive component is deactivated.
// beforeUnmount : Called right before a component instance is unmounted. At this stage the instance is still fully functional.
// unmounted : Called after a component instance has been unmounted.
Source by v3.vuejs.org #
 
PREVIOUS NEXT
Tagged: #vue #js #hooks
ADD COMMENT
Topic
Name
6+2 =