Replies: 2 comments 1 reply
-
@neznayer You should. See onDestroy
|
Beta Was this translation helpful? Give feedback.
0 replies
-
What happens if you don't remove the listener? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using d3.js with Svelte, inside a custom svelte action. I'm adding some mouse event listeners with d3, like
The svelte action optionally can return a cleanup function which is executed when the node is unmounted from DOM.
Is there a need to remove eventListeners added with d3 with
.on(...)
on node unmount? If so, how to do that?Beta Was this translation helpful? Give feedback.
All reactions