Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tipiirai
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
42 ms
·
631.
▲
by
tipiirai
11y ago
Because it was a valid response and many liked it, including me.
632.
▲
by
tipiirai
11y ago
Thank you. Glad you wrote this.
633.
▲
by
tipiirai
11y ago
What is the benefit? What's a typical use case?
634.
▲
by
tipiirai
11y ago
More guns == more murder. > “For each 1 percentage point increase in proportion of household gun ownership,” Siegel et al. found, “firearm homicide rate increased by 0.9″ percent. http://thinkprogress.org/justice/201
635.
▲
by
tipiirai
11y ago
Riot.js loops were fixed today. They are now around 4x faster than in React. React: http://jsfiddle.net/brianmfranklin/w674Lv7p/ Riot: http://jsfiddle.net/gianlucaguarini/cbjuek58/ just
636.
▲
by
tipiirai
12y ago
It doesn't
637.
▲
From Disqus to Muut
(muut.com)
16 points
by
tipiirai
12y ago
|
2 comments
638.
▲
by
tipiirai
12y ago
How does this differ from CoreOS?
639.
▲
by
tipiirai
12y ago
Since Riot is a "React- like 2.5KB UI library" the main purpose is to "muddle together" related layout and logic.
640.
▲
by
tipiirai
12y ago
Instead of class={ tabItem: true, is_active: something() } you can just write class="tabItem { is_active: something() }"
641.
▲
by
tipiirai
12y ago
On the child component you refer the parent data with `parent.` prefix.
642.
▲
by
tipiirai
12y ago
Riot is compared to React mostly and React worked as an inspiration for it. We totally see the value in it. We have used it and still use it on production. Not sure if you have seen the React vs Riot 2.0 comparison: https://muu
643.
▲
by
tipiirai
12y ago
Sure, I can answer. I think 124Kb does matter a lot. It's not just about the download size but several other things as well: 1. Code size. More vulnerable areas for bugs. Bigger stack traces. 2. Execution time. Scripts are not images
644.
▲
by
tipiirai
12y ago
Yup. In Riot the DOM is only updated when there is a diff. Server side support is coming so you can do "isomorphic" apps and render components on the HTML page as string. Current 2.0.1 does not support this feature.
645.
▲
by
tipiirai
12y ago
Like this <my-tag> <nested-tag1 if={ parent.val }/> <nested-tag2 if={ !parent.val }/> <input oninput={ edit }> edit(e) { this.val = e.target.value } </my-tag>
646.
▲
by
tipiirai
12y ago
I tend to give feedback on a form of GitHub issue. It's more focused and the discussion doesn't explode. For my own projects I like to get all the rants as well. Gives a broader picture. I have a feeling that HN doesn't have
647.
▲
by
tipiirai
12y ago
Definitely more readable than Mithril
648.
▲
by
tipiirai
12y ago
That's indeed the case. I basically code my own things and then release them as open source. jQuery Tools, Head JS and now Riot.js 2.0 to name the biggest contributions. HN is an unique place to get feedback for your own work. I certai
649.
▲
by
tipiirai
12y ago
You clearly love React and it works for you. The article is about the issues we had and how Riot solved them.
650.
▲
From React to Riot 2.0
(muut.com)
79 points
by
tipiirai
12y ago
|
38 comments
651.
▲
by
tipiirai
12y ago
Mithril "HTML" syntax is not for my taste: return m("html", [ m("body", [ m("input"), m("button", "Add"), m("table", [ m(&qu
652.
▲
by
tipiirai
12y ago
I'll start by improving the current implementation and see how far I can go with it without making it crazy. I'll start tokenizing after a concrete use case. Definitely keep this in mind. Thanks!
653.
▲
by
tipiirai
12y ago
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 sco
654.
▲
by
tipiirai
12y ago
I would say that Riot does very much what Polymer is trying to address - which is custom tags. The implementation and syntax is different so it's not a drop- in replacement, but both have similar goals.
655.
▲
by
tipiirai
12y ago
The design is vastly different . DOM update logic is more straightforward. We realized that heavy diffing is not needed.
656.
▲
by
tipiirai
12y ago
Need to consider the script tag.
657.
▲
by
tipiirai
12y ago
Glad you like React so much! Maybe have another look for Riot on a later time and you can perhaps see the reason for it to exist.
658.
▲
by
tipiirai
12y ago
I can clearly see the benefits here. I'm also resistant to it because of the added syntax. Deciding later :)
659.
▲
by
tipiirai
12y ago
I'm aware of this. Just wanting to avoid going there at this point and hoping that a smaller regex- based thing can do it.
660.
▲
by
tipiirai
12y ago
I want to continue from my earlier (hasty) response. I was on mobile and don't enjoy typing there. What I want to emphasize is that you can build custom tags without knowing much how Riot works. Just put together HTML and JavaScript. N
More ›