Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Each component maintains it's own state. Think them as functions with isolated scope. The tags accept arguments via HTML attributes and each tag has a reference to it's parent.

Instance variables and method are assigned to the scope and you have direct access to them on the HTML expressions. Once the scope changes and tag's `update()` method is called the expressions are calculated and DOM nodes are updated. Nested children are also updated.

You can update all tags at the same time with a global `riot.update()` method.

Hope this helps.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: