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(watch): once option should be ignored by watchEffect #11884

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

yangmingshan
Copy link
Contributor

@yangmingshan yangmingshan commented Sep 10, 2024

Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB (-33 B) 37.7 kB (-10 B) 34 kB (+5 B)
vue.global.prod.js 159 kB (-33 B) 57.6 kB (-12 B) 51.2 kB (-122 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 48.8 kB 18.8 kB 17.2 kB
createApp 55.3 kB (-33 B) 21.2 kB (-5 B) 19.4 kB (-41 B)
createSSRApp 59.2 kB (-33 B) 22.9 kB (-6 B) 20.9 kB (+36 B)
defineCustomElement 60 kB (-33 B) 22.8 kB (-7 B) 20.7 kB (-6 B)
overall 69 kB (-33 B) 26.3 kB (-5 B) 23.9 kB (+32 B)

Copy link

pkg-pr-new bot commented Sep 10, 2024

Open in Stackblitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@11884

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@11884

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@11884

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@11884

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@11884

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@11884

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@11884

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@11884

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@11884

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@11884

vue

pnpm add https://pkg.pr.new/vue@11884

commit: 9cbef6f

@edison1105
Copy link
Member

LGTM.

once: (3.4+) run the callback only once. The watcher is automatically stopped after the first callback run.

we should follow the document. https://vuejs.org/api/reactivity-core.html#watch

@edison1105 edison1105 added the ready for review This PR requires more reviews label Sep 11, 2024
@yyx990803 yyx990803 merged commit 49fa673 into vuejs:main Sep 16, 2024
13 checks passed
@yangmingshan yangmingshan deleted the once branch October 4, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR requires more reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants