You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It makes it possible for other libraries to store and use information from history.state objects as they would not been overridden by vue-router.
I encountered this when I was trying to build a bookmarking feature. I was able to use keys provided by vue-router for this, but I was just thinking that overriding may cause hard-to-find problems in some environments and also because this overriding could be easy to replace by extending.
What problem does this feature solve?
It makes it possible for other libraries to store and use information from history.state objects as they would not been overridden by vue-router.
I encountered this when I was trying to build a bookmarking feature. I was able to use keys provided by vue-router for this, but I was just thinking that overriding may cause hard-to-find problems in some environments and also because this overriding could be easy to replace by extending.
I mean these two lines in the codebase:
vue-router/src/util/push-state.js
Line 31 in 638278b
vue-router/src/util/push-state.js
Line 33 in 638278b
Using e.g.:
history.replaceState( {...history.state, ... { key: getStateKey() }}, '', url)
could cause less harm. Of course the key attribute would be still overridden.
What does the proposed API look like?
There are no API changes
The text was updated successfully, but these errors were encountered: