Properly destroy Vue components after they’re unmounted by React
This commit is contained in:
parent
231afa8ed6
commit
4654025423
|
@ -59,6 +59,11 @@ export default class {
|
|||
this.vueInstance.$mount(this.vueMount);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.vueInstance.$destroy();
|
||||
delete this._vueInstance;
|
||||
}
|
||||
|
||||
get vueMount() {
|
||||
const element = ReactDOM.findDOMNode(this);
|
||||
if (!element) return;
|
||||
|
|
Loading…
Reference in New Issue