Skip to content

Transition on router-view appears on pageload when router.beforeEach used #2031

@exophunk

Description

@exophunk

Version

3.0.1

Reproduction link

https://codepen.io/exophunk/pen/vdYKjd

Steps to reproduce

A transition animation on <router-view> is supposed to only happen when the route changes, not already on the initial page load. In initial page load, it should only happen, when the "appear" attribute is present on the transition.

When a router.beforeEach() hook is used and next() is called asynchronously, the transition also happens on initial page load. This is not desired and I don't finde a way to prevent it.

  • Is this an intended behaviour?
  • I think the usage of the beforeEach hook should not affect the transition on pageload.

What is expected?

No transition on page load in any case

What is actually happening?

Transition on initial page load, but only when beforeEach() hook is used with async callback.

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