I think it's worth noting that for the most part re-renders are a feature, not a bug in React applications. It's very standard to see complex components render 3-4 times for certain changes (especially big ones that bare side effects). Slow renders are the real pain point, and usually those should be addressed (either by memoization or smarter component hierarchy).
I think it's worth noting that for the most part re-renders are a feature, not a bug in React applications. It's very standard to see complex components render 3-4 times for certain changes (especially big ones that bare side effects). Slow renders are the real pain point, and usually those should be addressed (either by memoization or smarter component hierarchy).
Agreed.
Sometimes it helps to move several connected hooks to a new custom hook. That way costly re-renders can be decreased.