06
How do you prevent unnecessary re-renders in React?
Tap to write answer
0 words | 0 charsPress Enter ↵ to reveal
Your Attempt
0 wordsRefined Model Answer
ReferenceI would first identify which components are actually re-rendering and whether those renders are causing visible performance issues. Then I would look at memoization, stable props, splitting components, and reducing state that is stored too high in the tree. The reason I choose this approach is that premature optimization can make code harder to understand without improving user experience. I would also think about whether the real issue is rendering cost, network cost, or state design. If the interviewer wants more detail, I would explain how I would profile before and after the change.