Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
matthieusieben opened this issue Oct 2, 2019 · 3 comments
Open

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

matthieusieben opened this issue Oct 2, 2019 · 3 comments

Comments

@matthieusieben
Copy link

matthieusieben commented Oct 2, 2019

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.

@matthieusieben matthieusieben changed the title transitions with appear should be rendered with the "-enter" class transitions with appear should be SSR with the "-enter" class Oct 2, 2019
@matthieusieben
Copy link
Author

This issue is still unresolved.

@milesingrams
Copy link

I have this issue too. Expecting appear transitions to have the appear-from class applied on static generation and SSR so the initial position can be appropriately rendered until vue mounts

@drewbaker
Copy link

Yeah I expected that appear works for initial animation when SSR or client side render occurs. Otherwise not sure the point of appear, if I need to toggle a v-if on mounted to get the initial animation to happen anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants