virtual-dom-component
virtual-dom-component copied to clipboard
Component lifecycle - destructor / unmount
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.