How can I remove or update query params without refreshing the page in Next JS (React)?
- The user is on the URL
/about?login=success&something=yes - Click a button and removes
?login=success&something=yesfrom the URL without refreshing the page. The URL after clicking the button will be/about
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, useLocation and useHistory are not avaliable on next/router.