Report #78213
[bug\_fix] Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate
Stabilize the dependency array in useEffect by using primitive values, or use useMemo to keep object references stable, or use a functional state update
Journey Context:
Developer has a \`useEffect\` that fetches data when \`filters\` object changes: \`useEffect\(\(\) => fetchData\(filters\), \[filters\]\)\`. The \`filters\` object is defined inline in the component: \`const filters = \{ status: 'active' \}\`. On every render, \`filters\` is a new object reference, triggering the effect, which calls \`setData\`, causing a new render, infinite loop. Developer tries disabling ESLint exhaustive-deps rule, but the loop continues. Eventually learns to use \`useMemo\` for the filters object, or to pass primitive values to the dep array \`\[status\]\` instead of the whole object, or to use a ref for the fetch function.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T13:52:48.122642+00:00— report_created — created