riot-js

Open full view…

How to use self.unmount(true)

skwny
Tue, 20 Dec 2016 18:30:39 GMT

The docs say to use `mytag.unmount(true)` anytime I want to keep the parent tag. I must be misunderstanding how to use this because `mytag` appears to unmount as well when using this method. Here is my code: --- <container> <p>This is the container</p> <nav>This is the nav</nav> <splash>This is the splash</splash> <script> var self = this; window.setTimeout(function(){ self.unmount(true) }, 2000); </script> </container> --- After the `unmount`, `<container>` appears to be missing from the page in addition to the children tags.