anthonyshort / deku

Render interfaces using pure functions and virtual DOM
https://github.com/anthonyshort/deku/tree/master/docs
3.41k stars 130 forks source link

onRemove called after DOM elements have been removed #425

Closed pho3nixf1re closed 7 years ago

pho3nixf1re commented 8 years ago

I need to de-register event handlers from an external library. I register and unregister them via dispatch('dom:register') and dispatch('dom:unregister'). The problem is that when onRemove is called the DOM elements have already been removed and the deregistration fails. Is there a hook called when the component is getting removed but before the DOM actually goes away?