Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(reactivity): watchEffect should allow multiple onCleanup calls #12394

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shengxj1
Copy link

fix #3341

@@ -1564,6 +1564,20 @@ describe('api: watch', () => {
expect(cb).toHaveBeenCalledTimes(1)
})

// #3341
test('watchEffect should allow multiple onCleanup calls', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test name and changes of this PR don't seem to match. In fact, onCleanup already supports multiple calls, and this PR is about deduplicating the cleanup function.

@edison1105 edison1105 added scope: reactivity wait changes 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. scope: reactivity wait changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

watchEffect should allow multiple onInvalidate calls
2 participants