Version
2.5.2
Reproduction link
https://jsfiddle.net/hwdearborn/y9xqgz1c/4/
Steps to reproduce
- Click "to /", you will see "This is A"
- Click 'to B", you will see "This is B"
- Click 'to /" or use Back Button, you will see "This is"
Also note the console logs, which show how the order of the next() callback is different on the return visit (Step 3 above)
What is expected?
Without the "out-in" option on the transition, beforeRouteEnter's next() callback is fired after Component A is mounted, and its data is properly set.
What is actually happening?
With the "out-in" option on the transition, beforeRouteEnter's next() callback is fired before Component A's beforeCreate event, causing the data to get overriden with its default (empty) value
I came across this issue while trying to add an out-in transition to the Fetching Before Navigation
example from the docs.