Live data from Hacker News

Riot – A React-like, 2.5K user interface library

muut.com

21–30 of 222 posts

Re: Riot – A React-like, 2.5K user interface library

#22
One of React's selling points is that it uses a virtual DOM to minimize the amount of manipulations it does to the real DOM - http://facebook.github.io/react/docs/reconciliation.html.

The virtual DOM is an implementation detail (riot could re-render everything on each change), but it's what makes React fast, and good for handling big apps.

I don't think you can call a lib "react-like" if it doesn't have something like the virtual dom diff. You could say it has react-like syntax, maybe.

That said, I have been following riot for a while and I always liked its minimalistic approach. Maybe I will give it another look now that it is 2.0

EDIT: I somehow missed the big subtitle which says "Virtual DOM" on the website. It clearly states that Riot has something similar to React's. I can't explain know how I managed to not see it. Thanks to everyone who called me out.

Re: Riot – A React-like, 2.5K user interface library

#23
I like the use of a virtual DOM and the custom tags. Custom tags is what makes Angular easy to use. But I would like to see some benchmarks. I'm afraid parsing every single byte of every single html template is slow.

Riot also needs widgets. Lots of lots of widgets for material design widgets for making desktop and mobile apps, and twitter bootstrap like widgets. Good developers are lazy developers. They don't want to make an entire eco system.

Re: Riot – A React-like, 2.5K user interface library

#24
post #22

One of React's selling points is that it uses a virtual DOM to minimize the amount of manipulations it does to the real DOM - http://facebook.github.io/react/docs/reconciliation.html . The virtual DOM is an implementation detail (riot could re-render everything on each change), but it's what makes React fast, and good for handling big apps. I don't think you can call a lib "react-like" if it doesn't have something li…

It’s advertised as having a Virtual DOM.

Re: Riot – A React-like, 2.5K user interface library

#25

I like the use of a virtual DOM and the custom tags. Custom tags is what makes Angular easy to use. But I would like to see some benchmarks. I'm afraid parsing every single byte of every single html template is slow. Riot also needs widgets. Lots of lots of widgets for material design widgets for making desktop and mobile apps, and twitter bootstrap like widgets. Good developers are lazy developers. They don't want t…

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 are compiled and cached.

Any performance bottleneck can be fixed.

Re: Riot – A React-like, 2.5K user interface library

#26
post #6
post #5

I'd be really interested in the views from people who were much more into JS than I am. I've used Angular for a couple of small cases now and I like it, but have been hearing lots of good stuff about React (and even Om, I'm quite Clojure inclined). How does this stack up against React in terms of power, brevity, etc?

Maybe you can find the answer from the comparison section: https://muut.com/riotjs/compare.html

Maybe I'm missing something, but that comparison looks like apples versus oranges, or more specifically JavaScript-side versus HTML-side. The React example looks like the JS-side only, while the Riot example looks like the HTML-side only. What am I missing?

edit: I see a touch of embedded script (i.e. handleSubmit) in the Riot example, but not nearly enough to replicate the JS code in the React example. And there is a call, but it looks more like an Angular partial than an actual script.

Re: Riot – A React-like, 2.5K user interface library

#27
post #22

One of React's selling points is that it uses a virtual DOM to minimize the amount of manipulations it does to the real DOM - http://facebook.github.io/react/docs/reconciliation.html . The virtual DOM is an implementation detail (riot could re-render everything on each change), but it's what makes React fast, and good for handling big apps. I don't think you can call a lib "react-like" if it doesn't have something li…

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 changes for example).

Riot virtual DOM minimizes the work and makes less DOM manipulations than React on each update cycle.

Loops and conditionals can change the structure.

Re: Riot – A React-like, 2.5K user interface library

#28
I've been using Riot 1.0 for a number of simple things (including a few dashboards) and it's a lot less hassle than most other JS frameworks.

This looks like a very nice upgrade, in the sense that the previous templating was a bit ugly. I hope the virtual DOM let me handle SVG as well...

Re: Riot – A React-like, 2.5K user interface library

#29
post #6

Earlier quoted context omitted.

Maybe you can find the answer from the comparison section: https://muut.com/riotjs/compare.html

Maybe I'm missing something, but that comparison looks like apples versus oranges, or more specifically JavaScript-side versus HTML-side. The React example looks like the JS-side only, while the Riot example looks like the HTML-side only. What am I missing? edit: I see a touch of embedded script (i.e. handleSubmit) in the Riot example, but not nearly enough to replicate the JS code in the React example. And there is…

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".

Re: Riot – A React-like, 2.5K user interface library

#30
post #28

I've been using Riot 1.0 for a number of simple things (including a few dashboards) and it's a lot less hassle than most other JS frameworks. This looks like a very nice upgrade, in the sense that the previous templating was a bit ugly. I hope the virtual DOM let me handle SVG as well...

SVG should be no problem if loops and conditionals are enough for the logic. Never tried though.
Post reply on HN