Hacker News new | ask | show | jobs
by agos 562 days ago
but downstream components would still need to be wrapped in memo to do avoid rendering if the prop did not change!
1 comments

Thanks, I was not correct. Still, in my experience the impact from failing to ensure referential equality of props is usually a root cause of many issues.

If you make sure prop references are stable as early as possible, then if you run into poor performance you can always just wrap components in memo() (or some would just memo() all the things by default), but you may not even need it because renders also get cheaper when dependency diffing is effective and every hook does less work.

If prop references are unstable, things get messy in many ways.