-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
beforeRouterEnter next function callback does not follow the same lifecycle pattern that Vue does #2728
Comments
Yeah, it's inconsistent. Why would this be a problem though? making one of the callbacks depends on another one coming from a mixin is very implicit |
In our case the mixin is handling common logic between different components (which I believe is the main use case for them.) This common logic does some setup in If it is acknowledged that this is indeed something Vue router wants to fix I would gladly volunteer to look at the issue. |
okay, I don't think it's a good idea to keep such things in a mixin, but I would make it more consistent to have it in the right order and it will be great if you are willing to help on this! Please, do! |
Version
3.0.1
Reproduction link
https://codesandbox.io/embed/n48n7jpq6j
Steps to reproduce
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.
The text was updated successfully, but these errors were encountered: