I would like to remove a components from Vue at runtime that was previously registered with Vue.component(name, {...}), is this possible ?
We are creating a number of components on the fly in a live development setting and would like to remove old components from memory.
Or is it possible to alter the child components registered with a component at runtime ? Only affecting new component instances built after that of course or refreshed manually.
Currently in Vue 2.x, when you register a component with Vue.component
it's added to the base constructor options object. You can unregister it by simply deleting the component from the components object:
Vue.component('child-component', ChildComponent)
delete Vue.options.components['child-component']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With