Live data from Hacker News

Is ReactJS really fast?

blog.500tech.com

181–190 of 191 posts

Re: Is ReactJS really fast?

#181

The jsblocks library authors are being incredibly deceitful with the tests they are showing off. Their entire premise is that they are faster than react but their tests are just manipulated. They posted this up on product hunt, http://www.producthunt.com/posts/jsblocks , and at that point it claimed to be at 800ms on initial load where as react had 1250ms. I checked out the react code and there was a hidden input tha…

I'm surprised this is the first mention of jsblocks, when the graphics displayed by the article shows jsblocks beating everybody, including React.

Re: Is ReactJS really fast?

#182
post #133
post #110

Earlier quoted context omitted.

> small shop Like Facebook? Netflix? The BBC?

netflix = have their own renderer. that is lot of hours of good engineers dedicated to that. facebook = probably hack away all the low level stuff they need to tweak. bbc = they probably have the same problem we have here. that does not stop them or we to boast that we use react all over the place. doesn't mean we like it.

He forgot to add Airbnb to that list.

Re: Is ReactJS really fast?

#183

Earlier quoted context omitted.

And the reason you couldn't setup your stores in a similar fashion? myStore.setLoading(true); myStore.save(...); Where the handling is in your action handler for whatever event was raised... This assumes you do your backend data access in the store itself... there are other options.

Sorry for the confusion: setLoading (poorly named) is a method on a view component in ExtJS 4 which displays a modal message mask.

No confusion.. you can have a property on your store that does the same to state, and triggers an event to draw a mask/modal in a similar way... there's nothing preventing you from doing that... it isn't so much in the box, but you can do it pretty easily.

You also aren't stuck building class based object constructors in JS as extjs projects tend to do.. or trying to shim out areas of extjs in order to extend a base rendering.

Re: Is ReactJS really fast?

#184

React.js is actually just really pleasant to work in and easy to reason about, and the virtual DOM is what makes that all possible without it becoming unacceptably slow. DOM diffing isn't there to make React faster than everything else ever imagined. It's there to let you stop thinking about the DOM and focus on the world state of your frontend instead. I wasn't truly interested in React until I read this, which does…

The leaky abstraction thing is at the core of everything that is wrong the the AngularJS model. I still like a number of things about AngularJS, but the data-binding model was really poorly thought out and implemented. As far as I can tell this has been recognized even by the core team and is a major reason for the sizeable changes in 2.0. It surprises me how many people in the community continue to defend it as "OK"…

I second this. The issue with angular is it's attempt to approach a functional paradigm in the UI : the UI fully mirrors the state of the data and vice-versa.

React, by contrast, doesn't do state change detection and instead counts on the programmer to tell it when the state's changed.

What this article is saying is that if you use the advanced hacks in angular to disable large parts of that state reflection, then angular is (almost) as fast as react. This is true, but it's very misleading : if you don't use angular the way it's designed, the way it's used in every one of their tutorials and start manually updating things ... then it's fast.

That's great, but using frameworks in a way which is working around their core design principles is going to be very unpleasant.

Re: Is ReactJS really fast?

#185

React.js is actually just really pleasant to work in and easy to reason about, and the virtual DOM is what makes that all possible without it becoming unacceptably slow. DOM diffing isn't there to make React faster than everything else ever imagined. It's there to let you stop thinking about the DOM and focus on the world state of your frontend instead. I wasn't truly interested in React until I read this, which does…

The little time I've spent learning Mithril [1] makes me think it's a nice middle ground between speed and pleasurable coding experience. Their benchmarks have it at 8x faster at rendering (uncompiled) and 28x faster to load (although Benchmarks Lie (TM)). It feels like writing vanilla javascript for the most part, which is delightful and exciting. The Views part however, which is most comparable with React since Rea…

"It feels like writing vanilla javascript for the most part, which is delightful and exciting." - this sentence makes me shiver.

That being said, this looks interesting, thanks for bringing it to attention!

Re: Is ReactJS really fast?

#186

React.js is actually just really pleasant to work in and easy to reason about, and the virtual DOM is what makes that all possible without it becoming unacceptably slow. DOM diffing isn't there to make React faster than everything else ever imagined. It's there to let you stop thinking about the DOM and focus on the world state of your frontend instead. I wasn't truly interested in React until I read this, which does…

> Observables+DOM elements is a leaky abstraction The DOM itself is also a leaky abstraction. Render cycles are so prohibitively slow that we've started maintaining a parallel DOM and implementing diffing algorithms in JavaScript. As brilliant as that may be, it's also crazy that it's come to that. This is a problem that should be solved in the browser. HTML5 should add a simple API to transactionally update the DOM…

I remember React devs saying they always remember about that, so the whole library is designed to be easily detachable from the DOM, or whatever renderer you might be using. They're also kind of proving that now with ReactNative, and knowing what's coming in the next React versions it's gonna be even better.

Nice thing about React is that even after you remove the Virtual DOM it still encourages a really good model of programming and makes it effortless to build your app.

Re: Is ReactJS really fast?

#187

React.js is actually just really pleasant to work in and easy to reason about, and the virtual DOM is what makes that all possible without it becoming unacceptably slow. DOM diffing isn't there to make React faster than everything else ever imagined. It's there to let you stop thinking about the DOM and focus on the world state of your frontend instead. I wasn't truly interested in React until I read this, which does…

I just have to add that this is how pages were generated server-side before XmlHttpRequest emerged. This was deliberate. Addressable and re-loadable states were part of the original design by Tim Berners-Lee. The fact that we have had this whole circus with mutable state on the client side is just a joke to me. I hope that someone invents a sane client-side lib with sane page generation quite soon. Should certainly b…

> I hope that someone invents a sane client-side lib with sane page generation quite soon.

Can you explain more fully what you mean by "sane page generation" please? I am not getting your drift, apart from wondering if you want a return to 1990's static HTML pages...

Re: Is ReactJS really fast?

#188
post #5

I don't use React for it's speed, I'm sure I can make anything using vanilla or ember, or whatever just as fast. It's the way it makes you think about things...the developers on my team are now much more productive. They can jump onto something another developer has been working on and see what each component is doing. It's the declarative nature of React and the way it makes developers think about how they compose t…

I was swept away by the React hype a bit. I tried to sell my team on React by stating many of the same points and eventually we decided to stick with our current JS framework: ExtJS. And I'm thankful I was overruled a bit. For our team and the types of applications we're building ExtJS simply makes much more sense. I've used React now for a simple web app and also a Chrome extension. For certain UIs scenarios like Fa…

I would love there to be an ExtJS alternative - on ReactJS, EmberJS or something else - with all those widgets. Heck, a jQuery based library of widgets that are as nice as ExtJS would be beuuuuuuutiful.

Re: Is ReactJS really fast?

#189

React.js is actually just really pleasant to work in and easy to reason about, and the virtual DOM is what makes that all possible without it becoming unacceptably slow. DOM diffing isn't there to make React faster than everything else ever imagined. It's there to let you stop thinking about the DOM and focus on the world state of your frontend instead. I wasn't truly interested in React until I read this, which does…

Ugh, React people... Please stop saying "Reason about". Did you ever use that phrase even once in your life before you started using React? Just say that the code is more understandable or whatever.

Re: Is ReactJS really fast?

#190

Earlier quoted context omitted.

The little time I've spent learning Mithril [1] makes me think it's a nice middle ground between speed and pleasurable coding experience. Their benchmarks have it at 8x faster at rendering (uncompiled) and 28x faster to load (although Benchmarks Lie (TM)). It feels like writing vanilla javascript for the most part, which is delightful and exciting. The Views part however, which is most comparable with React since Rea…

"It feels like writing vanilla javascript for the most part, which is delightful and exciting." - this sentence makes me shiver. That being said, this looks interesting, thanks for bringing it to attention!

ahaha I understand why it would. I meant that the framework is extremely unobtrusive. All you do is create the beautiful expressive javascript objects which act as your models and controls, and then you just mount it with a mithril command, and that's it!
Post reply on HN