Skip to content

beforeRouterEnter next function callback does not follow the same lifecycle pattern that Vue does #2728

Closed
@itmayziii

Description

@itmayziii

Version

3.0.1

Reproduction link

https://codesandbox.io/embed/n48n7jpq6j

Steps to reproduce

  1. Add a beforeRouterEnter function that has a callback to a component
  2. Make the same component from step 1 use a mixin that also uses beforeRouteEnter with a callback
  3. The callback in the component will be called before the callback from the mixin which is inconsistent with how Vue handles the rest of the lifecycle methods.

Note that the mixin will actually be called before the component (expected behavior) but the callback in the mixin will not be (unexpected.)

What is expected?

The mixin beforeRouteEnter callback should be called before the components.

What is actually happening?

The components beforeRouterEnter callback is called before the mixins.

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