Skip to content

fix(runtime-vapor): warn when a component was made reactive - #15969

Merged
edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-warn-reactive-component
Oct 22, 2026
Merged

edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-warn-reactive-component

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

When a component is kept in a deep ref() (for example const current = ref(Tab) rendered with <component :is="current">), VDOM warns "Vue received a Component that was made a reactive object", suggests markRaw or shallowRef, and mounts the raw component. Vapor mounts the reactive proxy without a word, so the mistake goes unnoticed.

createVNode runs this dev-only check, but vapor's createComponent has no equivalent. This adds the same check behind __DEV__ at the top of createComponent. A few existing tests kept components in reactive data and now use shallowRef/markRaw.

Real-world example: https://github.com/LeoLun/willow-blog/blob/113dad392d5827b2b4cd7978c50d23addfa76f31/src/Game.vue#L5-L9 (see also vuejs/vuex#2016).

Playground

@coderabbitai

coderabbitai Bot commented Oct 21, 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: f02dd2e5-69a1-44ba-b520-888cc8a85336

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.4 kB 30.7 kB 27 kB
runtime-dom.global.prod.js 119 kB 44.8 kB 40.1 kB
vue.global.prod.js 180 kB 65.1 kB 58 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 54.6 kB 21.2 kB 19.4 kB
createApp 63.5 kB 24.5 kB 22.2 kB
createApp + vaporInteropPlugin 140 kB 50.6 kB 45.4 kB
createVaporApp 34.2 kB 13.2 kB 12.2 kB
createSSRApp 68.6 kB 26.5 kB 24.1 kB
createVaporSSRApp 41.1 kB 15.7 kB 14.4 kB
defineCustomElement 70.1 kB 26.5 kB 24.1 kB
defineVaporCustomElement 49.1 kB 18 kB 16.6 kB
overall 79.1 kB 30 kB 27.2 kB

@pkg-pr-new

pkg-pr-new Bot commented Oct 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/compiler-vapor

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/runtime-vapor

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: 1ed2619

@edison1105 edison1105 added the scope: vapor related to vapor mode label Oct 22, 2026
@edison1105
edison1105 merged commit 0c2ad89 into vuejs:minor Oct 22, 2026
15 checks passed
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