You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't found this explicitly stated, perhaps it was obvious, but I guess when a mounted DOM element with some observable listeners attached gets unmounted, the observable would just complete?
However, elements can also just be detached from the DOM without being actually destroyed and then reattached again, maybe to a different parent node. In that case completing the observable on unmount might not be the best thing to do? Maybe only complete when the node becomes garbage-collectible, as in, removed from the DOM with no reference retained?
The text was updated successfully, but these errors were encountered:
So we shouldn't think of an element as any special kind of event source, really. The same case is if some object that gets garbage collected holds onto a subscriber and occasionally pushes values to it. Once it's garbage collected, unless it decides to manually complete()/error() the Observable, that Observable will just be quiet from there on out.
I haven't found this explicitly stated, perhaps it was obvious, but I guess when a mounted DOM element with some observable listeners attached gets unmounted, the observable would just complete?
However, elements can also just be detached from the DOM without being actually destroyed and then reattached again, maybe to a different parent node. In that case completing the observable on unmount might not be the best thing to do? Maybe only complete when the node becomes garbage-collectible, as in, removed from the DOM with no reference retained?
The text was updated successfully, but these errors were encountered: