Several custom elements need to run something in Page.patch(function(state) {}).
So it is natural to assume they run this function on connectedCallback.
However, there is no way to remove that function on disconnectedCallback.
So custom elements need to register window listeners instead (and unregister them).
Several custom elements need to run something in
Page.patch(function(state) {})
. So it is natural to assume they run this function onconnectedCallback
. However, there is no way to remove that function ondisconnectedCallback
. So custom elements need to register window listeners instead (and unregister them).