title: How to retrieve the parameter after a hash (#) with React Router and useParams hook?
body: <p>I have a route like</p>
  <pre class="lang-js prettyprint-override"><code>&lt;Route path=&quot;/search/:slug&quot;&gt;&lt;SearchPage /&gt;&lt;/Route&gt;
  </code></pre>
  <p>in my React Router. SearchPage is a component that uses the <code>useParams()</code> hook provided by <code>react-router-dom</code>.</p>
  <pre class="lang-js prettyprint-override"><code>// SearchPage.js
  import React from 'react';
  import { useParams } from 'react-router-dom';
  
  export function SearchPage(props) {
      const { slug } = useParams();
      console.log(slug)
      // ...do other stuff
  }
  </code></pre>
  <p>However, when I navigate to <code>/search/foo#bar</code>, the SearchPage component only receives <code>foo</code> in the <code>slug</code>. It is possible for my component to receive the full <code>foo#bar</code>, or, better yet, <code>foo</code> and <code>bar</code> separately?</p>