React useEffect Infinite Loop — Causes and Fixes (2026)
Symptom: Component re-renders endlessly. Browser slows to a crawl. Console shows repeated API calls or state updates. Root Cause Infinite loops in useEffect happen when: the effect runs → causes…