Skip to content

transitions with appear should be SSR with the "-enter" class #10590

Open
@matthieusieben

Description

@matthieusieben

Version

2.6.10

Reproduction link

mkdir vue-bug-repo
yarn init -y
yarn add vue vue-server-renderer
// Step 1: Create a Vue instance
const Vue = require('vue')
const app = new Vue({
  data: () => ({ show: true }),
  template: `<div>
    <transition appear name="fade">
      <p v-if="show">
      Hello World
      </p>
    </transition>
  </div>`
})

// Step 2: Create a renderer
const renderer = require('vue-server-renderer').createRenderer()
renderer.renderToString(app).then(html => {
  console.log(html)
}).catch(err => {
  console.error(err)
})

Steps to reproduce

  • node index.js

What is expected?

The server response should contain the *enter classes applied to the transitioning element. The *active classes should then be applied during the hydration so that the transition can appear smoothly.

What is actually happening?

The element is first displayed, as if there were no transitions. Then then entire animation starts, causing wired animations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions