TL;DR: Can you simply delete a DOM element which contains child elements that are Vue apps, and have no memory issues doing this multiple times in a SPA. Or is there a special unmount process to follow.
So the scenario is a jQuery & Backbone application being migrated to Vue 3. Loading pages/views are controlled by the application JS and Vue components are loaded manually by the JS using createApp().
When a view is changed, the parent dom element above the Vue root element is deleted using jQuery.
In this scenario, do you need to take into account issues with the vue dom element being removed from the DOM? Should we unmount the Vue application before removing parent doms? Are there memory leaks to consider?
I currently tried:
vue_app_instance.unmount()
But for some reason get tonns of errors from the Vue Chrome extension:
Uncaught (in promise) Error: Timed out getting app record for app [object Object] at backend.js:811
But the app works fine and without errors if I just let jQuery delete the page and allow Vue to mount a new 'app' on the new page the user navigated to.