I have the following code
render () {
return html`<panel>${mobile
? html`${this.renderPane("side")}`
:
html `${this.renderPane("bottom")}`
`
}
renderPane(slot: string) {
return html `<x slot=${slot} .mobile=${this._isMobile}></x>`;
}
For some reason, when I resize the screen (mobile = true), the constructor for "x" lit element gets called again, and disconnectedCallback gets called, which removes the listeners that I added to connectedCallback. Does anyone know why that's happening?