#Event to listen to for HMR?

2 messages · Page 1 of 1 (latest)

spiral star
#

I'm developing a Svelte component that has a WebGL canvas that has many listeners for resize, animation frames, etc. However, when HMR happens, the old event listeners are not destroyed, but new ones are created. Over time, this uses more and more resources, which is something I would not like. Is there some event I can listen to when HMR happens so that I can destroy the old listeners? Or is this more of a Svelte issue?

hybrid ermineBOT
#
Still waiting for an answer?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.