Skip to content

fix(runtime-vapor): mark props as shallow so watching props is not deep - #15506

Merged
edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-props-shallow
Sep 14, 2026
Merged

edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-props-shallow

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

Vapor props don't report themselves as shallow, so watch(props, cb) traverses them deeply.

In VDOM props are shallowReactive, so watching the whole props object only reacts when a prop itself changes. In Vapor isShallow(props) is false and watch walks every nested value. Typing into an input bound to user.name in the parent fires the child's watch(props), even though no prop was replaced. Playground

It also means every run of that watcher walks all nested prop values and subscribes to them, which adds up when a big object or list is passed down.

The props proxy already answers IS_REACTIVE so that watch(props) doesn't warn about an invalid source. I made it answer IS_SHALLOW as well, so watch takes the same traverse(source, 1) path it takes for VDOM props.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c6bf18d2-3ffd-4629-a090-90c77a6dbb38

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Sep 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@15506
npm i https://pkg.pr.new/@vue/compiler-core@15506
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@15506
npm i https://pkg.pr.new/@vue/compiler-dom@15506
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@15506
npm i https://pkg.pr.new/@vue/compiler-sfc@15506
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@15506
npm i https://pkg.pr.new/@vue/compiler-ssr@15506
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@15506
npm i https://pkg.pr.new/@vue/compiler-vapor@15506
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@15506
npm i https://pkg.pr.new/@vue/reactivity@15506
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@15506
npm i https://pkg.pr.new/@vue/runtime-core@15506
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@15506
npm i https://pkg.pr.new/@vue/runtime-dom@15506
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@15506
npm i https://pkg.pr.new/@vue/runtime-vapor@15506
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@15506
npm i https://pkg.pr.new/@vue/server-renderer@15506
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@15506
npm i https://pkg.pr.new/@vue/shared@15506
yarn add https://pkg.pr.new/@vue/[email protected]

vue

pnpm add https://pkg.pr.new/vue@15506
npm i https://pkg.pr.new/vue@15506
yarn add https://pkg.pr.new/[email protected]

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@15506
npm i https://pkg.pr.new/@vue/compat@15506
yarn add https://pkg.pr.new/@vue/[email protected]

commit: afa5b56

@github-actions

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.2 kB 30.6 kB 26.9 kB
runtime-dom.global.prod.js 116 kB 43.7 kB 39.1 kB
vue.global.prod.js 176 kB 63.9 kB 56.8 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 53.2 kB 20.6 kB 18.8 kB
createApp 61.9 kB 23.8 kB 21.7 kB
createApp + vaporInteropPlugin 119 kB (+21 B) 42.8 kB (+11 B) 38.5 kB (+1 B)
createVaporApp 30.5 kB (+21 B) 11.7 kB (+8 B) 10.8 kB (+14 B)
createSSRApp 67.1 kB 25.9 kB 23.5 kB
createVaporSSRApp 36.7 kB (+21 B) 14 kB (+8 B) 12.8 kB (+2 B)
defineCustomElement 68.5 kB 25.8 kB 23.5 kB
defineVaporCustomElement 45.9 kB (+21 B) 16.7 kB (+6 B) 15.3 kB (+1 B)
overall 77.3 kB 29.4 kB 26.6 kB

@edison1105 edison1105 added the scope: vapor related to vapor mode label Sep 14, 2026
@edison1105
edison1105 merged commit 958580b into vuejs:minor Sep 14, 2026
15 checks passed
@ValentinYoushkevich
ValentinYoushkevich deleted the fix/vapor-props-shallow branch September 17, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: vapor related to vapor mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants