title: How To Pass Props To Function Component use react-router-dom v6
body: <p>I want to pass props into a function from the route, my code currently looks like this</p>
  <p><strong>Route</strong></p>
  <pre><code> &lt;Route path=&quot;/person&quot; render={(params) =&gt; &lt;ProductDetails {...params} /&gt;} /&gt; 
  </code></pre>
  <p><strong>Code</strong></p>
  <pre><code>function ProductDetails(props) {  
    return (  
      &lt;div className=&quot;section has-text-centered mt-4&quot;&gt;  
        console.log(props)  
        &lt;h1&gt;Hello&lt;/h1&gt;  
      &lt;/div&gt;  
    );  
  };  
  export default ProductDetails;
  </code></pre>
  <p>What am I missing here, please help.</p>