This is a bug, I think.
Consider:
<div if="{active}">
<div data-is="{tagName}"></div>
</div>
When active is set, the tagName will be mounted, but when active flag is cleared, the tagName is removed from the DOM but not automatically unmounted (i.e. no "unmount" events are fired and the tag instance is not cleaned up).
This also makes me wonder what would happen if <div data-is></div> tags are removed from the DOM manually... would this same bug occur?
Here it is on Plnkr in fewer than 70 lines of code.
I am using Chromium 56 on Linux Mint 18.1. Riot 3.4.0.
@GianlucaGuarini - Thank you! BTW... Riot is awesome. So much better than any other reactive UI framework that I've used (and I've tried a lot of them).
Most helpful comment
@GianlucaGuarini - Thank you! BTW... Riot is awesome. So much better than any other reactive UI framework that I've used (and I've tried a lot of them).