BeforeRouteEnter() happens after mounted() after upgrade. #2239
-
Hey, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Are the Is the logging done immediately, at the top of the hook, or do you have some asynchronous code that might be delaying the logging? I've adjusted the example from the Vue Router docs to use those two hooks:
As mentioned in the docs:
If it hasn't been created then it definitely hasn't been mounted. |
Beta Was this translation helpful? Give feedback.
Are the
beforeRouteEnter
andmounted
in the same component?Is the logging done immediately, at the top of the hook, or do you have some asynchronous code that might be delaying the logging?
I've adjusted the example from the Vue Router docs to use those two hooks:
beforeRouteEnter
definitely runs beforemounted
.As mentioned in the docs:
If it hasn't been created then it definitely hasn't been mounted.