Hi Jamil!

I advise you to look into the beforeDestroy() lifecycle hook. As this would be the place and time when I would clean up after my component before it gets destroyed.

Only take into consideration that EventBus.$off('myEvent') will remove all the listeners for that particular event. To remove a specific component’s specific callback you have to call the $off() with a second argument like EventBus.$off('myEvent', myCallback)


Writing JS, TS, Vue, #C, and fostering teams to release customer value n-times a day. Creator of billid.app and writer on abrickis.me

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store