title: How to get data of input fields from previous page when next page is loaded?
body: <p>when &quot;Search&quot; is clicked, next page is loaded by the below code.</p>
  <pre><code>import React from &quot;react&quot;;
  import { Link } from &quot;react-router-dom&quot;;
  
  function name(){
  return(
   &lt;div className=&quot;search&quot;&gt;
      &lt;input type=&quot;text&quot;placeholder=&quot;city name&quot;&gt;&lt;/input&gt;
      &lt;input type=&quot;text&quot;placeholder=&quot;number of people&quot;&gt;&lt;/input&gt;
      &lt;p&gt;&lt;Link to=&quot;/nextpage&quot;&gt;Search&lt;/Link&lt;/p&gt;
  &lt;/div&gt;
  )
  }
  </code></pre>
  <p>I want to take data of these input fields to fetch api using that data to make cards on next page.
  How to do it?</p>