Closed robokozo closed 6 years ago
Could it maybe hook into .beforeResolve?
It uses afterEach, which makes sense because in all other hooka, the navigation has not yet been confirmed and could be canceled or redirected anytime.
The source is barely 80 lines, just take a look
https://github.com/vuejs/vuex-router-sync/blob/master/src/index.js#L35
I'd like to see documentation on where this 'plugin' fits into the existing navigation lifecycle seen here: https://router.vuejs.org/en/advanced/navigation-guards.html
The one trap I keep falling into is that I cannot reliably figure out when the module is being updated.
So in my component I have to keep doing things like this:
While I 'feel' like I should already have access to the up-to-date postId directly from the route module... it doesn't get updated until later. I don't know when that is.