how to remove query from Next js 13 app url without reloading?

how to remove query from next js 13 app url without reloading?
1 Reply
bedesqui
bedesqui2y ago
If you're fine with soft navigations, the useRouter hook should work. If not, you can change the URL by assigning a new value to document.location.search(Probably a good idea to create the value you'll use with new URLSearchParams(window.location.search)).
Want results from more Discord servers?
Add your server