Fix the slow render before you fix the re-render: How to start optimizing your React app renders
#ReactJS #Performancehttps://kentcdodds.com/blog/fix-the-slow-render-before-you-fix-the-re-render …
I disagree that it's purely an education problem. Tooling rapidly tells us which components are slow and people know that some of the time they can get an instant performance increase by reducing accidental renders. It takes longer to profile further: it might not be worth it.
-
-
You're looking at a granular piece of the problem. What Kent is trying to say is even if you don't memoize, React does a pretty good job at figuring out that the unnecessary render is unnecessary and skips reconciliation. Slow renders usually slows down the whole app if at top.
-
The tooling also helps you narrow down and spot costly slow renders that slow down your app. Kent's point is to focus on that rather than trying to solve a problem React has already solved internally. Also worth mentioning that memo doesn't speed up your app. Quick renders do.
- 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Then you can _still_ fix the unnecessary re-render if you want.