Skip to content

docs: clarify async onWatcherCleanup usage#3424

Open
happysnaker wants to merge 1 commit into
vuejs:mainfrom
happysnaker:docs-onwatchercleanup-async-example
Open

docs: clarify async onWatcherCleanup usage#3424
happysnaker wants to merge 1 commit into
vuejs:mainfrom
happysnaker:docs-onwatchercleanup-async-example

Conversation

@happysnaker

Copy link
Copy Markdown

Summary

  • clarify that onWatcherCleanup() must be registered before the first await in an async watcher callback
  • add a small async example showing the intended usage pattern
  • keep the guidance next to the existing onCleanup alternative

Closes #3222

Note

This PR supersedes #3422, which I had to close after the original fork relationship was broken during repo visibility changes on my side. The content is being resubmitted unchanged from a proper public fork.

@netlify

netlify Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 8635ad2
🔍 Latest deploy log https://app.netlify.com/projects/vuejs/deploys/6a4383d962d1c30008ed5f7f
😎 Deploy Preview https://deploy-preview-3424--vuejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Documentation clarification needed for onWatcherCleanup in async contexts

1 participant