title: history push is pushing two times same key
body: <p>English is not my language so there might be mistakes, i'm beginner programmer(react hooks), my form(antd) data is moving in url, everything is working fine except going back and changing form input value to another then going again forward, i can see there is now two times same key but different value, my point is now there is for example 'name=james' and 'name=susan', but i want to have just one 'name' and it should be the latest, should i be pushing differently? below is also a picture i made about this, if it helps to understand. when   console.log(query); it shows both 'names'</p>
  <p>Next page function comes from here :
  &lt; Form onFinish={nextPage}&gt;
  &lt; / Form&gt;</p>
  <p>i'm going back from page b to page a like this:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const query = window.location.toString().split("?")[1];
  
    const handleclick = () =&gt; {
      history.push(`/pagea/${custId}?${query}`);
    };</code></pre>
  </div>
  </div>
  </p>
  <p>history push in nextPage function is like this</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const query = window.location.toString().split("?")[1];
  
    const nextPage = (order: rRequest) =&gt; {
  
      history.push(`/customers/${custId}?${query}&amp;name=${order.name}`);
   };</code></pre>
  </div>
  </div>
  </p>
  <p><a href="https://i.stack.imgur.com/QfqBm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QfqBm.png" alt="enter image description here" /></a></p>