Riot: `<div if="...">` containing `<div data-is="...">` does not unmount tag properly

Created on 5 Apr 2017  路  1Comment  路  Source: riot/riot

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.

bug fixed

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).

>All comments

@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).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mikechaos picture Mikechaos  路  40Comments

weepy picture weepy  路  38Comments

niutech picture niutech  路  25Comments

em-sghosh picture em-sghosh  路  33Comments

jrx-jsj picture jrx-jsj  路  23Comments