title: react-router Link with dynamic search parameters
body: <p>I want to allow my users to download a report based on a input, a checkbox or a date picker.</p>
  
  <pre><code> const ReportRoute = (props) =&gt; {
    const [input, setInput] = useState('');
  
    const testObject1 = {
      name: {input},
    }
  
    return (
        &lt;div&gt;
          &lt;input value={input} onInput={e =&gt; setInput(e.target.value)} /&gt;
          &lt;Link
            to={{
              pathname: `api/report/name`,
              search: queryString.stringify(testObject1),
              }}
          &gt;
            Download {props.type} report
          &lt;/Link&gt;
        &lt;/div&gt;
    );
  };
  </code></pre>
  
  <p>I've got a Link to /api/report/name, but I cannot find how to change dynamic the search query with the value from the input.</p>
  
  <p>I want two thinks :
  1) If my user type "ngos" in the input, the query should be api/report/name?name=input
  2) And if input is empty, the query should be api/report/name</p>