title: NEXT JS - How to remove Query Params
body: <p>How can I remove or update query params without refreshing the page in Next JS (React)?</p>
  <ol>
  <li>The user is on the URL <code>/about?login=success&amp;something=yes</code></li>
  <li>Click a button and removes <code>?login=success&amp;something=yes</code> from the URL without refreshing the page. The URL after clicking the button will be <code>/about</code></li>
  </ol>
  <p>How can I achieve it?</p>
  <p>As mentioned in this <a href="https://stackoverflow.com/questions/62032050/how-to-remove-query-param-with-react-hooks">thread</a>, I know that is possible to remove query params or query strings with Router. But, <code>useLocation</code> and <code>useHistory</code> are not avaliable on <code>next/router</code>.</p>