Skip to content

docs(watchers): clarify watchEffect dependency re-collection - #3449

Open
smg99 wants to merge 3 commits into
vuejs:mainfrom
smg99:docs/clarify-watcheffect-dependency-recollection
Open

smg99 wants to merge 3 commits into
vuejs:mainfrom
smg99:docs/clarify-watcheffect-dependency-recollection

Conversation

@smg99

@smg99 smg99 commented Aug 6, 2026

Copy link
Copy Markdown

Description of Problem

watchEffect() dependency tracking wording can be misread as a fixed dependency list. The docs should clarify that dependencies are collected on each synchronous run, so branch-dependent access can change the tracked set between runs.

Proposed Solution

Update the watchEffect() tip in src/guide/essentials/watchers.md to clarify:

  • tracking happens during each synchronous run;
  • dependencies are re-collected on every re-run based on properties accessed in that run;
  • conditional branches can change the tracked dependency set between runs;
  • async effects still only track accesses before the first await tick.

Additional Information

Context: vuejs/core#13688 and vuejs/core#15212

@netlify

netlify Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

👷 Deploy request for vuejs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 6638a34

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