Order of beforeResolve
vs beforeMount
#1710
-
I'm upgrading an app from Vue 2 to 3 and came across a problem due to an apparent change in the order of the router In vue 2 and vue-router 3, the order was:
Whereas in vue 3 and vue-router 4 the order is:
(I have determined this order by adding breakpoints in each.) This change does not seem to be documented in the upgrade guide, or at least I couldn't find it anywhere. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is because Routing Lifecycle and Component Lifecycle are independent. Callbacks passed to hooks should therefore also be independent and not rely on the order. |
Beta Was this translation helpful? Give feedback.
This is because Routing Lifecycle and Component Lifecycle are independent. Callbacks passed to hooks should therefore also be independent and not rely on the order.