https://github.com/muut/riotjs
There are some pitfall.
* To mount other tags (defined somewhere outside), I need to put it inside an event:
this.on('mount', function() { riot.mount('other-tag', ...) }
* If you see "onXYZ" on a rendered tag, it meant the event handler wasn't binded correctly. Most of the time, it might because of unresolved handeler.
I don't know when yourHandler is enough, or I must write parent.yourHandler
<ul each={ items}> <li onclick={ parent.yourHandler } ...* Remember the scope by set self = this first in the script. It's really helpful!
No comments:
Post a Comment
New comment