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?
#Event to listen to for HMR?
2 messages · Page 1 of 1 (latest)