Hacker News new | ask | show | jobs
by seangrogg 3311 days ago
Hmm, my experience has been pretty much the opposite. Even without optimization, React's renders won't cause a DOM update unless there is something to diff - I can't say the same for jQuery or Angular 1.x. As well, being big on the "don't use it unless you need it" bandwagon I tend to wait until I see components and re-use in my code before I import React in the first place.

If the total re-render is occurring under 16.67ms (60fps) in a non-trivial use-case I'm usually fine leaving it as-is. Most render cycles taking longer than that involve operations on large data sets or events firing at the millisecond level (mouseover, drag, etc) - and those are worth fixing as they'll actually have noticeable impacts on the user experience. But I tend not to optimize just to pat myself on the back for "optimization".