Skip to content

docs: clarify old values for immediate watchers - #3498

Open
smg99 wants to merge 1 commit into
vuejs:mainfrom
smg99:docs/watch-immediate-old-value
Open

smg99 wants to merge 1 commit into
vuejs:mainfrom
smg99:docs/watch-immediate-old-value

Conversation

@smg99

@smg99 smg99 commented Nov 18, 2026

Copy link
Copy Markdown

Description of Problem

The watch() API says the first previous value with immediate: true is always undefined. For an array of sources, Vue supplies an empty array.

Proposed Solution

Document the first callback argument shape for single and multiple sources.

Additional Information

Verified on Vue 3.5.44 with both kinds of watcher. The next multi-source callback received the previous values in source order.

@netlify

netlify Bot commented Nov 18, 2026

Copy link
Copy Markdown

👷 Deploy request for vuejs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 563008a

This branch has not been deployed

No deployments
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