2.3.0
https://jsfiddle.net/sciooga/rahhqu0o/
click navigate1 and navigate2 button
change query every times
navigate1 return a str and just change once
$route.query is considered immutable. The router compares the new query against the old query - however because you mutated the old query and passed it to router.push, the comparison is basically comparing the same object to itself.
Cloning is the correct way to do it.
@sciooga
let query = JSON.parse(JSON.stringify(this.$route.query))
Not pretty, but effective.
Most helpful comment
@sciooga
let query = JSON.parse(JSON.stringify(this.$route.query))Not pretty, but effective.