Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

There's a difference between “virtual DOM” and components.

In React, components are not just functions that return their own virtual DOM. AFAIK for many vdom-based libraries this statement wouldn't be true.

React components may have local state (as much as some people hate it, some find it useful), they have a lifecycle, can react to receiving new props with side effects, can implement diff bail-out hook. And you can nest such components declaratively.



view as:

The other libraries intentionally left out shouldComponentUpdate because they don't think it's something a developer should have to worry about. I don't know of any evidence to suggest that React is faster because of this feature.

And declarative nesting is a feature of all of the frameworks I've come across, I'm not sure why you think that's unique to React. The advantage feature I would credit React for is the size of its community and influential advocates like you.


>declarative nesting is a feature of all of the frameworks I've come across, I'm not sure why you think that's unique to React

Declarative nesting of lifecycle-ful and stateful components without going full FRP.

I'm actually excited to learn about other frameworks that do this! Which do you have in mind?


WPF (even completely ignoring XAML), JavaFX both support declarative nesting with interesting databinding features to support it. They are based on retained scene graphs, however.

If you are interested in academics, I published such a system at ECOOP in 2006:

http://research.microsoft.com/pubs/179366/mcdirmid06superglu...


Legal | privacy