virtual-dom-component icon indicating copy to clipboard operation
virtual-dom-component copied to clipboard

Component lifecycle - destructor / unmount

Open tantaman opened this issue 9 years ago • 0 comments

A vital lifecycle method that is missing is something to handle when the component "unmounts" / is no longer displayed.

The reason being is that your component may have registered itself with various datasources (document.addEventListener, SomeGlobalDataCache.addChangeListener) which you must clean up to prevent leaking memory.

Btw, I love the inclusion of events for a component.

tantaman avatar Jul 25 '15 13:07 tantaman