Open exogen opened 8 years ago
I just got it from the http://todomvc.com website. I got the code a few weeks ago, so it was 15.1.0 at the time. Did best practices change in such a short time is the whole React community on 15.3.1 now and doing it the new way?
Yeah, not saying it's your fault, rather that TodoMVC is outdated. :)
React itself may have been at 15.1.0, but if you check out the package.json
in the TodoMVC react
example, it's still at 0.13.x and that's what the example code targets.
@exogen Could you do a minimal update to the latest React way of things and do a PR? I'd try but have absolutely zero knowledge of React :grin:
It doesn't seem like a fair comparison when the react code isn't idiomatic and has deprecated calls in it. The results are also odd since React beats Angular 1 in many other benchmarks (even old ones) yet somehow in this benchmark it is slower than Angular 1.
https://www.codementor.io/reactjs/tutorial/reactjs-vs-angular-js-performance-comparison-knockout
I don't mean to be "that guy" and nitpick the benchmarked code, but... I'm gonna be.
The TodoMVC React code was written for an old version of React. If you actually pop it open and try using it, it throws an error (try editing an item).
React.findDOMNode
hasn't been a thing since React 0.13; that should be changed toReactDOM.findDOMNode
.Hand-optimized React 15 code would also switch all the components from
React.createClass
to extendingReact.Component
, which is the new hotness and (AFAIK) renders faster. This would necessitate adding another Babel transform to the React demo.