title: import error: 'useParams' is not exported from 'react-router-dom'
body: <p>I'm using &quot;react-router-dom&quot;: &quot;^4.2.2&quot; but the useParams not working what should I do?</p>
  <pre><code>import { useParams } from 'react-router-dom';
  import DATA from '../Data';
  
  const ProductDetail = () =&gt; {
      {/* Now we need a product id which is pass from the product page. */}
      const proid = useParams();
      const proDetail = DATA.filter(x =&gt; x.id == proid.id)
      const product = proDetail[0];
      console.log(product);
  </code></pre>