Re:Understanding UseMemo and UseCallback
by acover on Wednesday August 31, 2022 @12:11PM
(#32664269)
Yeah I only started caring about this when tracking down lag in my app. Though it's fun to think about :)
I believe this causes a real Dom update because it can't know the onclick function hasn't materially changed. It's just diffing function references.
My best advice is (also apart from React): Do not spend time on imagined/anticipated performance bottlenecks; only ever spend time on performance tuning if there are real (perceived, not measurable!) performance issues (there has to be a profiling report in your hand).