Using React Router, what's the best way of pushing a new entry to the history so it updates the URL, but without triggering a new route?
The Navigation.replaceWith()
mixin method seems to do the opposite of what I need.
Using React Router, what's the best way of pushing a new entry to the history so it updates the URL, but without triggering a new route?
The Navigation.replaceWith()
mixin method seems to do the opposite of what I need.
Not really familiar with React-Router's API, but you could use pure javascript to do that.
window.history.pushState({}, '', 'https://stackoverflow.com/new-url-here');
More answers here: Modify the URL without reloading the page