#26 most commonruntime/UILovableBolt.newCursorReplitv0Windsurf
Too many re-renders / Maximum update depth exceeded
Error: Too many re-renders. React limits the number of renders to prevent an infinite loop. / Maximum update depth exceeded.
Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.
Paste your error →What it means
A part of your page keeps changing itself, which makes it redraw, which makes it change itself again, forever. React stops it to prevent your browser from freezing.
How to fix it: paste this prompt into your AI builder
Fix prompt for Lovable, Bolt, Cursor, Replit, v0, Windsurf
My app throws "Too many re-renders" / "Maximum update depth exceeded". Find the component in the stack trace and look for: state being set directly during render, onClick={fn()} instead of onClick={() => fn()}, and useEffect hooks that set state that is also in their own dependency array (or objects/arrays recreated every render used as dependencies). Fix the loop with the smallest change (correct the handler, fix dependencies, or memoize the value). Do not change unrelated components or styling.
If the AI can't fix it: manual steps
- Look for onClick={something()} with brackets in the component named in the error; it should usually be onClick={() => something()}.
- If it started after a specific change, revert that change from version history.
Where this happens
Seen in these AI app builders and editors:
LovableBolt.newCursorReplitv0Windsurf
Sources
Related runtime/UI errors
Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.
Fix my error →