Skip to content

fix(vue3): Set.delete() not triggering Vue computed updates#68

Merged
treardon17 merged 1 commit into
mainfrom
fix/vue-set-delete-reactivity
Dec 19, 2025
Merged

fix(vue3): Set.delete() not triggering Vue computed updates#68
treardon17 merged 1 commit into
mainfrom
fix/vue-set-delete-reactivity

Conversation

@treardon17
Copy link
Copy Markdown
Collaborator

Fixed two issues in the Vue 3 integration's onDelete handler:

  1. The handler was clearing all reactive mappings for the target after a Set.delete(), which broke subsequent notifications since Vue was tracking the old mappings.

  2. The handler wasn't notifying Vue about tracked iteration keys (Symbol.iterator, etc.) when keysChanged was true, unlike onSet.

This caused Vue computed properties that used Array.from(set) or spread operators to not react when items were deleted from Sets returned by methods.

Added test cases covering:

  • Vue computed iterating Set returned from method
  • Set.delete via double indirection through Map lookup

🤖 Generated with Claude Code

Fixed two issues in the Vue 3 integration's onDelete handler:

1. The handler was clearing all reactive mappings for the target after
   a Set.delete(), which broke subsequent notifications since Vue was
   tracking the old mappings.

2. The handler wasn't notifying Vue about tracked iteration keys
   (Symbol.iterator, etc.) when keysChanged was true, unlike onSet.

This caused Vue computed properties that used Array.from(set) or spread
operators to not react when items were deleted from Sets returned by
methods.

Added test cases covering:
- Vue computed iterating Set returned from method
- Set.delete via double indirection through Map lookup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@treardon17 treardon17 self-assigned this Dec 19, 2025
@treardon17 treardon17 merged commit 2bc4128 into main Dec 19, 2025
4 checks passed
@treardon17 treardon17 deleted the fix/vue-set-delete-reactivity branch December 19, 2025 23:12
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.

1 participant