Report #100997
[bug\_fix] React throws 'Too many re-renders. React limits the number of renders to prevent an infinite loop' because state is updated unconditionally during render, often by calling a handler function instead of passing it or by calling \`setState\` in the component body.
Move the state update into an event handler or \`useEffect\`. If you are deriving UI state, compute the value during render without calling the setter. Ensure event handlers are passed as references \(\`onClick=\{handleClick\}\`\) not invoked \(\`onClick=\{handleClick\(\)\}\`\).
Journey Context:
A new teammate writes \`\`. The page crashes immediately with 'Too many re-renders'. They think the button is being clicked repeatedly, but actually \`handleClick\(\)\` runs during every render and calls \`setCount\`, which triggers another render. You point to the React docs section on this error: the loop is render -> setState -> render. You change the JSX to \`onClick=\{handleClick\}\` and, for a computed full name, remove the redundant \`useState\`/\`useEffect\` pair and calculate it directly during render. The infinite loop stops.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T04:48:40.236007+00:00— report_created — created