4 ms·
this is the first time I see mentions of react being difficult to optimize and I'd like to know more, is there any in depth quality article about it anybody kno
by LoSboccacc 7y ago
this is the first time I see mentions of react being difficult to optimize and I'd like to know more, is there any in depth quality article about it anybody knows on top of the usual light blogs a search finds?
- iddan 7y agoNo there isn’t because it’s BS. React is super easy to optimise. https://reactjs.org/docs/optimizing-performance.html https://reactjs.org/docs/optimizing-performance.html
- csande17 7y agoPeople say React is easy to optimize, but many of the React apps I use in practice have crummy 50-100 millisecond response times on basic operations like "click button" or "press key in text field". And a significant portion of the performance difference between beta MDN and old MDN was the ~half second the React code took to run in the beta. I'm pretty sure front-end developers aren't writing slow code on purpose. The most reasonable explanation I can come up with is that React makes it easier to write reliable UI code but harder to reason about performance -- features like "by default, all of a component's descendants are recreated and diffed with the DOM on any state change" point strongly in this direction.