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.
Riot – A React-like, 2.5K user interface library
41–50 of 222 posts
Re: Riot – A React-like, 2.5K user interface library
#42One 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…
> 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. Sorry, I don't follow. The Riot.js project site DOES tout "Virtual DOM" as one of its features. You say it doesn't actually have that?
Re: Riot – A React-like, 2.5K user interface library
#43Earlier quoted context omitted.
It’s advertised as having a Virtual DOM.
You are right, I will have to investigate more. I don't know how much of react's virtual dom diff can you cram in 2.5kb though :)
Re: Riot – A React-like, 2.5K user interface library
#44Re: Riot – A React-like, 2.5K user interface library
#45I still don't get how state works, whether state changes propagate down the components as prop changes like in React, etc.
Re: Riot – A React-like, 2.5K user interface library
#46Earlier quoted context omitted.
It’s advertised as having a Virtual DOM.
You are right, I will have to investigate more. I don't know how much of react's virtual dom diff can you cram in 2.5kb though :)
That's starting from the 42k 1.2.0 distfile.
Re: Riot – A React-like, 2.5K user interface library
#47Does this support nesting custom tags? How do I communicate between different tags? Is the opts variable accessible outside the definition of the tag?
Unlimited nesting is supported. You pass options with HTML attributes: this.data = { foo: 'bar' }
Re: Riot – A React-like, 2.5K user interface library
#48Earlier quoted context omitted.
You are right, I will have to investigate more. I don't know how much of react's virtual dom diff can you cram in 2.5kb though :)
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.
Re: Riot – A React-like, 2.5K user interface library
#49Re: Riot – A React-like, 2.5K user interface library
#50What's wrong with React?