Skip to content

Fix: tag filter causes "Maximum update depth exceeded" crash - #30

Merged
dh1011 merged 1 commit into
dh1011:mainfrom
justasno:fix/tag-filter-issue
Apr 24, 2026
Merged

Fix: tag filter causes "Maximum update depth exceeded" crash#30
dh1011 merged 1 commit into
dh1011:mainfrom
justasno:fix/tag-filter-issue

Conversation

@justasno

Copy link
Copy Markdown
Contributor

A fix for Crash when filtering by a tag #29

Clicking a tag badge to filter subscriptions triggers an infinite re-render loop because:

filteredSubscriptions is recomputed via .filter() on every render, producing a new array reference

The useEffect that pushes this to the parent fires on every new reference

Parent re-renders with new inline callback props, re-triggering the effect

Fixed by:

Wrapping filteredSubscriptions in useMemo

Stabilizing parent callbacks with useCallback

Changes by Sonnet 4.6

Clicking a tag badge to filter subscriptions triggers an infinite re-render loop because:

filteredSubscriptions is recomputed via .filter() on every render, producing a new array reference

The useEffect that pushes this to the parent fires on every new reference

Parent re-renders with new inline callback props, re-triggering the effect

Fixed by:

Wrapping filteredSubscriptions in useMemo

Stabilizing parent callbacks with useCallback
@dh1011
dh1011 merged commit 26ef038 into dh1011:main Apr 24, 2026
1 check passed
@dh1011

dh1011 commented Apr 24, 2026

Copy link
Copy Markdown
Owner

merged. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants