Subscribe on changes!

renderToString renders Fragment instead of tag provided as prop to TransitionGroup

avatar
Oct 28th 2020

Version

3.0.2

Reproduction link

https://github.com/raukaute/vue3-SSR-TransitionGroup

Steps to reproduce

  1. Clone git repo and run server.js
  2. Browse localhost:8080

Probably the most basic Vue SSR app the world has ever seen. I hope it's enough of a reproduction to see the problem I encountered.

Instead of running the server it will also be enough to just look at what the renderToString function returns. This obviously won't show the hydration mismatch on client though.

What is expected?

Render actual tag that was provided as prop

What is actually happening?

It renders Fragment


Please let me know if this needs more information and I'll try to provide.

Cheers!

avatar
Oct 29th 2020

https://github.com/vuejs/vue-next/blob/829b35e4260181b6d01e0f598a469750a64ed0ea/packages/compiler-ssr/src/transforms/ssrTransformComponent.ts#L181

Indeed in the compiler-ssr, we render transition-groups as fragments (4th argument). But I think the skip of the root node happens earlier / somewhere else, looking....