Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tipiirai
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
39 ms
·
661.
▲
by
tipiirai
12y ago
Riot has lifecycle events.
662.
▲
by
tipiirai
12y ago
riot.mountTo() lets you "lazily" render a tag on a specific node. Thanks for the analysis.
663.
▲
by
tipiirai
12y ago
The above is not possible with Riot.
664.
▲
by
tipiirai
12y ago
React is closer to Riot than Angular because of HTML/JS components backed with virtual dom. The HTML syntax is perhaps closer to Angular than JSX. I'm sure there will be a Angular comparison here as well: https://muut.c
665.
▲
by
tipiirai
12y ago
True. Things have changed since then. Especially about role of jQuery in views. Riot 2.0 unifies HTML/JS together causing less need for it. I still think jQuery is still fantastic and definitely has a lot of use cases.
666.
▲
by
tipiirai
12y ago
Currently styling is outside Riot's responsibility. Shadow elements are not supported enough on browsers and require too much polyfilling. Also not sure about component- based styling in general. I think that CSS should be controlled s
667.
▲
by
tipiirai
12y ago
Not sure but this might indeed fail. Can you place an issue to github? Thanks! Maybe it's good to split HTML and JS with the last HTML tag.
668.
▲
by
tipiirai
12y ago
We certainly thought about rebranding. But since Riot 2.0 continues the minimalistic approach and "only" changes the way how views are assebled we thought the name can stay.
669.
▲
by
tipiirai
12y ago
This is all very true. But in case of Riot I suppose it's best for you to read the documentation and see whether it does the job for you. I personally think the custom tag approach is a great way to go.
670.
▲
by
tipiirai
12y ago
Agreed. This is coming.
671.
▲
by
tipiirai
12y ago
Size is multiple things: 1. simplicity 2. maintanability 3. API surface and learning curve Riot also about minimalism , especially in syntax. Less proprietary stuff (and keystrokes).
672.
▲
by
tipiirai
12y ago
Riot 1.0 started liking what React did to views.
673.
▲
by
tipiirai
12y ago
Riot 2.0 is a "core" library and such controls can be build on top of it. No controls exist, since this is all very new.
674.
▲
by
tipiirai
12y ago
I'm sorry :)
675.
▲
by
tipiirai
12y ago
Definitely some similarities exist like you listed. Riot offers following to the (massive) client-side table: 1. Custom tags (with unscary HTML + JS syntax) 2. Minimalism (both size and API surface) 3. Performance (minimizing DOM operation
676.
▲
by
tipiirai
12y ago
Server side rendering is on the roadmap among other things. Look for the last item on the FAQ: https://muut.com/riotjs/faq.html
677.
▲
by
tipiirai
12y ago
Thanks. I think comparing Riot with React is most important initially. And there is no Riot 2.0 TodoMVC example available yet. I also think that Riot performance can be further optimized. Slowly getting there...
678.
▲
by
tipiirai
12y ago
In Riot you need to do following: <my-tag> <div each={ items }> </div> // use JS to construct items this.items = arr.map(fn) // or how you want it </my-tag> And you can al
679.
▲
by
tipiirai
12y ago
Yes. This is indeed a big challenge. Maybe I can just use the TodoMVC app.
680.
▲
by
tipiirai
12y ago
The point of React is to mix HTML and JS together. They deliberately mix templates with logic, which is actually the main inspiration for Riot. But we felt that what React does could be simplified. We didn't need full diffing and batch
681.
▲
by
tipiirai
12y ago
Exactly. Loops and conditionals should give you enough power. But in React you can arbitrarily change HTML because the render method returns a string to be compared to the earlier situation. A tag name can change for example (which you rare
682.
▲
by
tipiirai
12y ago
Ribbon is now there. Thank you!
683.
▲
by
tipiirai
12y ago
Not much. The point is that such heavy diffing can be avoided if loops and conditionals are enough and if you don't need random HTML changes.
684.
▲
by
tipiirai
12y ago
Virtual DOM implementation is indeed different. The biggest reason for calling it "React-like" is the basic idea of components, where related HTML and JS are combined together. > "Build components, not templates" htt
685.
▲
by
tipiirai
12y ago
Here you go: https://github.com/muut/riotjs It's on the download page. Admittedly not very visible.
686.
▲
by
tipiirai
12y ago
SVG should be no problem if loops and conditionals are enough for the logic. Never tried though.
687.
▲
by
tipiirai
12y ago
React components written in JavaScript with embedded "JSX". Riot components are HTML (mixed with expressions) + JavaScript. Perhaps the HTML root element makes it look like "HTML-side only".
688.
▲
by
tipiirai
12y ago
Riot virtual DOM is a simple expression -> DOM node map. It's much different than what React has. Riot cannot make random sub-tree replacements. It's best for situations where the tag HTML structure is fixed (no tag name change
689.
▲
by
tipiirai
12y ago
Benchmarks are definitely coming. In theory Riot is super fast. The DOM is parsed once when a tag is initialized and after that the text nodes and attributes are only updated if the expression results to a different value. The expressions a
690.
▲
by
tipiirai
12y ago
muut.com uses Riot for authentication, signups and for forum settings which is a fairly large application. The site is fairly popular. Of course React is much more tested and probably more solid at this point and Riot 2.0 is just released.
More ›