Open pratyushtewari opened 4 years ago
it feels like the teardown is not happening.
Even if I call destroy in the parent element, the events are still emitting. in parent I called
beforeDestroy() {
console.log("destroying vue-typed-js");
this.$children[0].$destroy();
},
I checked the there was only 1 child component in this parent and it was vue-typed-js.
I'm also having problems with events being fired properly using nuxt: https://github.com/Orlandster/vue-typed-js/issues/31
Not using nuxt but observing the same problem.
Events are firing as if a <vue-typed-js>
component exists, when really I'm destroying the element by passing a falsey value into the v-if
. I've also tried wrapping the <vue-typed-js>
component in a <div>
, but I still see the same events fire.
I love this library & use typed.js quite a bit, but it's causing a lot of unnecessary events :P
I am nost sure if this is an issue of default behavior of vue/nuxt
I am using
vue-typed-js
on one of the pages in my nuxt website, and even when I navigate away from the page where I used this component, I see a lot of events continuously emitted by this package. Is that suppose to happen?These events were being emitted even when I only opened the home page.
My setup is as follows:
I added a file called
plugins/vue-typed-js.js
and in
nuxt.config.js
file I haveI have this component being used in a page deep inside the route
http://localhost:3000/projects/testProject
and I can see the events even when I open the index.html at the roothttp://localhost:3000/
after I have opened the project page.Is there any special way to destroy the component after navigating away?