Avoiding unnecessary cleanup work in disconnectedCallback

from blog Read the Tea Leaves, | ↗ original
↗ original
In a previous post, I said that a web component’s connectedCallback and disconnectedCallback should be mirror images of each other: one for setup, the other for cleanup. Sometimes, though, you want to avoid unnecessary cleanup work when your component has merely been moved around in the DOM: This can happen when, for example, your component […]