Change URL with applying the modified url parameters but not reloading the current page.

You can use the ‘searchParams’ to manipulate URL parameters.

If you what to set the new URL, you can use ‘window.location.href’ but in that case, you cannot avoid page refreshing.

But if you use, the ‘window.history.pushState()’ you can change the current URL without refreshing the current page.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store