4 ms·
How about editing your above comment that was badmouthing react then?
by j-krieger 6y ago
How about editing your above comment that was badmouthing react then?
- okareaman 6y agoBecause I don't know it's not React. Twitter could be using a stripped down minimal version of React with limited functionality. Standard React could still be a bloated mess.
- Drew_ 6y ago> Standard React could still be a bloated mess. React is ~6KB (even less g-zipped). React is very performant and its performance was one of it's original claims to fame over previous frontend frameworks like Angular.
- okareaman 6y agoAs I said, it's not the size of the React library that's the problem: https://news.ycombinator.com/item?id=26691150 https://news.ycombinator.com/item?id=26691150
- Drew_ 6y agoThere is no additional overhead in nesting React components vs normal HTML elements. React-rendered and normally rendered HTML are identical.
- okareaman 6y agoDan Ambramov has stated the reason hooks was created was to avoid nesting hell that was used to manage state. I may be misunderstanding him. I am not s React expert.
- Drew_ 6y agoReact hooks are just Javascript functions. The layout of your application is unaffected by the shape of your application state. Instead the shape of your application's state is typically governed by its layout.
- jiofih 6y agoReact never claimed performance, and the virtual DOM is quite wasteful. Any direct manipulation library will perform better. Plus, it’s dishonest to look at react core size. react-dom, which is absolutely required, is 40KB minified AND compressed. Plus the usual plugins to handle icons, SVG, animations, and on on. A base React application easily crosses the 200KB gzipped mark.
- Drew_ 6y ago> React never claimed performance, and the virtual DOM is quite wasteful. Any direct manipulation library will perform better. React's performance (in large part because of it's virtual DOM) over Angular was a common benefit cited in it's rise to fame. Indeed no one ever claimed React was somehow faster than the document API (or even JQuery) and that isn't what I'm saying either. Whether or not you think the virtual DOM is wasteful in 2021 is a separate opinion and even Svelte devs admit the virtual DOM approach is usually fast enough. > A base React application easily crosses the 200KB gzipped mark. I didn't bootstrap a CRA app to check its full size, but considering a hero image alone can easily be larger than this, it still stands that React is certainly not "bloated".
- jiofih 6y agoThe mating call of all react devs - “but what about the images”. Who said a 100KB hero image was a good idea either? It doesn’t excuse dropping a 1MB (when executed) bomb of JavaScript to deliver a blog post and making mobile and low speed users suffer. It’s also established that byte per byte, JS is way more costly to download, parse and execute than images, the comparison itself is dumb.
- thrower123 6y agoBeing faster and smaller than Angular isn't much of a feat...