title: React Router: NavLink based on hash
body: <p>I'm trying to create a navigation bar that displays the active link based on the page's hash using React Router's <code>NavLink</code> component. Here's what I have:</p>
  
  <pre><code>&lt;NavLink to="#home"&gt;Home&lt;/NavLink&gt;
  &lt;NavLink to="#about"&gt;About&lt;/NavLink&gt;
  </code></pre>
  
  <p>Both of these links have the <code>active</code> class, no matter what the hash is. How can I make the link display as active based on the current hash?</p>