Fix React Nested State Re-Render Performance Issues - Optimization Guide
I'm experiencing performance issues with unnecessary re-renders in my React application when updating nested state objects. Current Setup: - React version: [version] - State management: [library/hooks used] - Component structure: [brief description] Code: [code] Observed Issues: - [specific re-render behavior] - Performance impact: [metrics if available] What I've tried: - [debugging attempts] Please help me: 1. Identify why these re-renders are occurring 2. Suggest optimal state management patterns for nested data 3. Provide refactored code with explanations 4. Recommend tools/techniques to prevent future issues