You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vue lifecycle hooks - particularly beforeDestroy - should not be used to trigger application logic.
The vue component lifecycle hooks are tied to the DOM lifecycle, not the application lifecycle. beforeDestroy should only be used for low-level cleanup operations like removing DOM event listeners, clearing timers, and cleaning up callbacks.
Application logic that might currently be triggered by beforeDestroy should instead be triggered by whatever vuex action or state change actually caused the component to be destroyed.
indirectlylit
changed the title
remove all instances of app logic being triggered by beforeDestroy
Don't use beforeDestroy to affect tracking and progress logging logic
Dec 15, 2017
Vue lifecycle hooks - particularly
beforeDestroy
- should not be used to trigger application logic.The vue component lifecycle hooks are tied to the DOM lifecycle, not the application lifecycle.
beforeDestroy
should only be used for low-level cleanup operations like removing DOM event listeners, clearing timers, and cleaning up callbacks.Application logic that might currently be triggered by
beforeDestroy
should instead be triggered by whatever vuex action or state change actually caused the component to be destroyed.refs:
Some specific things to look for:
this.$emit('stopTracking');
this.saveAttemptLogMasterLog(false);
this.stopTracking();
The text was updated successfully, but these errors were encountered: