Subscribe on changes!

App created with 'createSSRApp()' on the client side is not unmounted when call 'app.unmount()' method.

avatar
May 24th 2022

Vue version

3.2.33

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-jycpna?file=src/main.js

Steps to reproduce

  1. open reproduction link
  2. wait 3 seconds

What is expected?

After 3 seconds of opening the reproduction link, the vue app should unmount. The counter should not work.

What is actually happening?

Even though app.unmount() is called, the counter is still running. Even if the app is created with createSSRApp() on the client side, it must be unmounted when the app.unmount() method is called. Just like createApp().

System Info

No response

Any additional comments?

avatar
May 24th 2022

why would you use createSSRApp() on the client side when it's for the server-side?

Edit: I'm a dumb-dumb.

avatar
May 24th 2022

When using ssr, must use 'createSSRApp()' on the client side. This is also stated in the vue.js ssr guide document. https://vuejs.org/guide/scaling-up/ssr.html#client-hydration

avatar
May 24th 2022

Sent a PR

avatar
May 25th 2022

@LinusBorg Thank you so much.

avatar
May 25th 2022

@LinusBorg Thank you very much for the bug fix. I checked by installing the bug-fixed version (3.2.36). However, the container._vnode = vnode code seems to be missing. Please check if the build is not successful.

Oh, I misunderstood. Sorry. When is the release?

avatar
May 25th 2022

Please do not ask when it will be released. It will be released when appropriate.