Change url without navigation #1649
Unanswered
LCD344
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on an SPA and as I am updating from vue2 to vue3 I have encountered the following warning
" history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
history.replaceState(history.state, '', url)"
Except that I am actually using history.pushState intentionally to change url while not reloading the page. (to see this in action in vue2 - https://map.elcoop.io/nur - and click on any of the images on the map) - the idea is just to make it possible for the user to copy+paste the url for the specific marker.
Is there any non-warny way to do this?
also you can find the code here (in vue 2) https://github.com/el-coop/captains-map/blob/master/src/router.js (pushRoute method)
Beta Was this translation helpful? Give feedback.
All reactions