4 ms·
Performance is not the point of React. Predictability is. Bunches of bugs are eliminated and others are easier to find.
by dangoor 10y ago
Performance is not the point of React. Predictability is. Bunches of bugs are eliminated and others are easier to find.
- deckard1 10y ago> Bunches of bugs are eliminated and others are easier to find. Got a link to the research for that? My pet peeve is unsubstantiated bullshit claims. We let sooooo much nonsense fly, especially in JS land.
- marshalltony 10y agoI will go write a blog post on medium claiming some research I did and link to it. The stuff I read on here makes me never want to come back to this website again.
- dangoor 10y agoI don't know if Facebook has done any formal studies. Here's one way to think about it: if you have a webapp and have state in JS objects that you have to synchronize with the DOM, that generally takes a fair bit of code. React provided an approach for eliminating synchronization code entirely. My own experience and that of the many others that created webapps pre-React and then adopted it is that its model simplifies our work and removes bugs. That's why we use it. It's also why there are a bunch of other vdom libraries and Ember and Angular have both moved toward similar one-way data flow models. There's a lot that we do day-to-day that doesn't have research to back it up. At some point, we have to try things out for ourselves to see how they work for us.
- cageface 10y agoAnecdotally I can certainly back this up from my own experience. My React based UIs are so much easier to build and maintain than the jQuery stuff they replaced.
- kentor 10y agoYou can ask for research and proof sure, but it should be very intuitive that a delcarative, "re-render everything from props and state with a call to setState()" system is less error prone than the two way binding digest mess that is angular, or manual dom manipulations for that matter. Reminder: VirtualDOM is just an optimization of the rerender everything problem.