How can I remove or update query params without refreshing the page in Next JS (React)?
?login=success&something=yes from the URL without refreshing the page. The URL after clicking the button will be
How can I achieve it?
As mentioned in this thread, I know that is possible to remove query params or query strings with Router. But,
useHistory are not avaliable on
According to the History, you can using
history.replaceState to implement this.
window.history.replaceState(null, '', '/about')