title: TypeError: Cannot read properties of undefined (reading 'useParams')
body: <p>Good day, I'm having problems with the latest react-router-dom v6, I still learning the new version. Please help.</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>import React from 'react'
  
  function Bookingscrren({match}) {
    return (
      &lt;div&gt;
          &lt;h1&gt;Booking Page&lt;/h1&gt;
          &lt;h1&gt;Room id = {match.useParams.roomid}&lt;/h1&gt;
  
      &lt;/div&gt;
    )
  }
  
  export default Bookingscrren</code></pre>
  </div>
  </div>
  </p>
  <p>Browser Output Error:
  <a href="https://i.stack.imgur.com/9iP8K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9iP8K.png" alt="enter image description here" /></a></p>
  <p>Please be kind :) I'm new</p>