Skip to content

fix(runtime-vapor): run app mounted hooks after hydration ends - #15753

Merged
edison1105 merged 1 commit into
vuejs:minorfrom
lazerg:fix/issue-15752-vapor-hydration-mounted
Oct 3, 2026
Merged

edison1105 merged 1 commit into
vuejs:minorfrom
lazerg:fix/issue-15752-vapor-hydration-mounted

Conversation

@lazerg

@lazerg lazerg commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

When createVaporSSRApp hydrates a component that changes state in onMounted, a v-for class binding keeps a stale class on the previous item. hydrateApp calls flushOnAppMount() inside withHydration(), so mounted hooks and the effects they trigger run while isHydrating is still true. The createSelector watcher then calls setClass on the old item, which only checks for a mismatch during hydration and never patches the DOM.

flushOnAppMount() now runs after withHydration() returns, so mounted hooks see a finished hydration, as they do on a regular mount.

close #15752

@coderabbitai

coderabbitai Bot commented Oct 2, 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: 42c24600-5118-4f11-82bf-f68a7ade3ed4

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

Autopilot is currently an internal CodeRabbit preview.


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

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.2 kB (+136 B) 30.6 kB (+145 B) 26.9 kB (+134 B)
runtime-dom.global.prod.js 117 kB (+2.29 kB) 43.9 kB (+885 B) 39.3 kB (+705 B)
vue.global.prod.js 177 kB (+2.35 kB) 64 kB (+996 B) 57 kB (+836 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 53.2 kB (+1.14 kB) 20.7 kB (+383 B) 18.9 kB (+404 B)
createApp 62 kB (+837 B) 23.9 kB (+272 B) 21.8 kB (+225 B)
createApp + vaporInteropPlugin 129 kB (+22.9 kB) 46.6 kB (+8 kB) 41.9 kB (+7.11 kB)
createVaporApp 34.1 kB (+5.36 kB) 13.1 kB (+1.96 kB) 12 kB (+1.78 kB)
createSSRApp 67 kB (+1 kB) 26 kB (+363 B) 23.6 kB (+355 B)
createVaporSSRApp 40.8 kB (+6.96 kB) 15.5 kB (+2.54 kB) 14.2 kB (+2.32 kB)
defineCustomElement 68.5 kB (+775 B) 25.9 kB (+220 B) 23.6 kB (+225 B)
defineVaporCustomElement 48.6 kB (+4.17 kB) 17.7 kB (+1.54 kB) 16.3 kB (+1.42 kB)
overall 77.5 kB (+1.3 kB) 29.5 kB (+402 B) 26.7 kB (+431 B)

@lazerg

lazerg commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

The continuous-release failure is a pkg.pr.new server error during publish (500, then 404). It is not caused by this change.

@edison1105 edison1105 added the scope: vapor related to vapor mode label Oct 3, 2026
@edison1105
edison1105 merged commit 7484f44 into vuejs:minor Oct 3, 2026
13 of 14 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