In my component I have a mounted hook that fetches some data as an async request:
mounted() {
this.fetchData()
}
and on beforeDestroy I delete the data from the store:
beforeDestroy(){
this.destroyDataInStore()
}
These work fine so long as the request in mounted resolves prior to the component begins its tear down.
Is there any way I can defer the beforeDestroy until after the promise has resolved in the mount?