News for hackers. Stuff that matters.
Re:How to Create a Tab UI with Riot 2.0 by bshimmin on Wednesday January 28, 2015 @11:42AM (#8960866)
Aside from the usual unpleasantness of muddling together views and logic (and welcome back `onclick`, how I've missed you...), I find the idea of the "parent" scope rather troubling. If you have something nested inside a tab, let's say a link, what is its parent - an individual tab, or the whole "tabs" component?
Re:How to Create a Tab UI with Riot 2.0 by tipiirai on Wednesday January 28, 2015 @11:52AM (#8960932)
Since Riot is a "React- like 2.5KB UI library" the main purpose is to "muddle together" related layout and logic.
Re:How to Create a Tab UI with Riot 2.0 by tipiirai on Wednesday January 28, 2015 @11:21AM (#8960709)
Instead of

   class={ tabItem: true, is_active: something() }
you can just write

   class="tabItem { is_active: something() }"
Re:How to Create a Tab UI with Riot 2.0 by robertwpearce00 on Wednesday January 28, 2015 @11:50AM (#8960920)
oh, that's awesome. will update
Re:How to Create a Tab UI with Riot 2.0 by SimeVidas on Wednesday January 28, 2015 @11:44AM (#8960880)
Custom elements must contain a hyphen: http://w3c.github.io/webcomponents/spec/custom/#dfn-custom-e.... Just `<tabs>` is not allowed.
Re:How to Create a Tab UI with Riot 2.0 by maemre on Wednesday January 28, 2015 @01:10PM (#8961449)
According to [1], Riot developers are aware of that and chose to support custom tags without a dash:

> W3C specification demands you use a dash in the tag name. Instead of <person> you must write <my-person>. Obey this rule if you care about W3C. Both work fine.

However using hyphens to be standards-compliant and future compatible would be better.

[1]: https://muut.com/riotjs/faq.html

Re:How to Create a Tab UI with Riot 2.0 by quest88 on Wednesday January 28, 2015 @11:13AM (#8960651)
Of course we'd still have posts in 2015 about how to make tabs.